diff --git a/build.third_step0-jdk11.gradle b/build.third_step0-jdk11.gradle index 5e281c1d0..fd284fa04 100644 --- a/build.third_step0-jdk11.gradle +++ b/build.third_step0-jdk11.gradle @@ -121,5 +121,15 @@ task unpack(type:Copy) { } +// 将essential依赖等级的jar全部解压到classes下 +task unpackEssential(type:Copy) { + for (File file : configurations.essential.files) { + from zipTree(file) + } + into classesDir +} + +jar.dependsOn unpackEssential + jar.dependsOn unpack diff --git a/build.third_step0.gradle b/build.third_step0.gradle index 26a3e633f..6ba98602f 100644 --- a/build.third_step0.gradle +++ b/build.third_step0.gradle @@ -78,6 +78,9 @@ String cbbVersion = findProperty("cbbVersion") //指定依赖 dependencies{ essential "com.fr.essential:fine-essential:${essentialVersion}" + essential "com.fr.cbb:fine-scheduler:${cbbVersion}" + essential "com.fr.cbb:fine-function:${cbbVersion}" + essential "com.fr.cbb:fine-sql:${cbbVersion}" // thirdjar "com.fr.third:fine-third-base:10.0-BASE-SNAPSHOT" // sigar "com.fr.third:sigar:1.6.0" testCompile 'junit:junit:4.12' @@ -96,7 +99,7 @@ publishing { third_build(MavenPublication) { groupId "com.fr.third" - artifactId "fine-third" + artifactId project.hasProperty("withCBB") ? "fine-third" : "fine-third-without-cbb" version maven_version_build ext.repo = 'snapshot' from components.java @@ -164,4 +167,19 @@ task unpack(type:Copy) { } } -jar.dependsOn unpack \ No newline at end of file +// 将essential依赖等级的jar全部解压到classes下 +task unpackEssential(type:Copy) { + if (project.hasProperty("withCBB")) { + for (File file : configurations.essential.files) { + from (zipTree(file)) { + exclude "META-INF/versions/11/*" + exclude "META-INF/maven/com.zaxxer/**" + } + } + into classesDir + } +} + +unpackEssential.dependsOn unpack + +jar.dependsOn unpackEssential \ No newline at end of file