Browse Source

clean up gradle, add api jar task. (thanks to ramidzkh)

master
Martmists 2 years ago
parent
commit
c85f9e4eba
  1. 1
      build.gradle
  2. 18
      versions/common.gradle

1
build.gradle

@ -11,6 +11,7 @@ buildscript { @@ -11,6 +11,7 @@ buildscript {
}
}
apply plugin: "java"
apply plugin: "idea"
tasks.withType(JavaCompile) {

18
versions/common.gradle

@ -41,22 +41,6 @@ processResources { @@ -41,22 +41,6 @@ processResources {
setBuildDir("../../build")
sourceSets {
main {
java {
srcDirs = ["../../src/main/java"]
}
resources {
srcDirs = ["../../src/main/resources"]
}
}
api {
java {
srcDirs = ["../../src/main/java/com/martmists/ynet/api"]
}
}
}
jar {
from "LICENSE"
}
@ -68,7 +52,7 @@ task sourcesJar(type: Jar, dependsOn: classes) { @@ -68,7 +52,7 @@ task sourcesJar(type: Jar, dependsOn: classes) {
task apiJar(type: Jar, dependsOn: classes) {
archiveClassifier.set("api")
from sourceSets.api.allSource
from sourceSets.main.allSource.filter { it.path.contains("/api/") }
}
jar.dependsOn apiJar

Loading…
Cancel
Save