From 4ac44b4691309ad940c29a30a07e2f3bdcabdd8b Mon Sep 17 00:00:00 2001 From: "Cloud.Liu" Date: Fri, 16 Apr 2021 19:58:05 +0800 Subject: [PATCH 1/3] =?UTF-8?q?DEC-17833=20feat:=20CBB=E7=8B=AC=E7=AB=8B?= =?UTF-8?q?=E5=8F=91=E5=B8=83=20third=E6=89=93=E5=8C=85=E8=84=9A=E6=9C=AC?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.third_step0.gradle | 30 ++++++++++-------------------- build.third_step2.gradle | 18 +++--------------- build.third_step3.gradle | 19 +++---------------- build.third_step4.gradle | 18 +++--------------- build.third_step5.gradle | 18 +++--------------- build.third_step6.gradle | 18 +++--------------- build.third_step7.gradle | 18 +++--------------- 7 files changed, 28 insertions(+), 111 deletions(-) diff --git a/build.third_step0.gradle b/build.third_step0.gradle index b847efe06..0c78f0285 100644 --- a/build.third_step0.gradle +++ b/build.third_step0.gradle @@ -71,26 +71,16 @@ configurations { essential } -// 主体代码与CBB的对应关系 -String essentialBranch -switch (branchNameUpperCase) { - case "FEATURE": - case "RESEARCH": - essentialBranch = "FEATURE" - break - case "RELEASE": - case "BUGFIX": - essentialBranch = "RELEASE" - break - default: - essentialBranch = "MASTER" -} - -dependencies { - essential "com.fr.essential:fine-essential:1.0-${essentialBranch}-SNAPSHOT" - essential "com.fr.cbb:fine-scheduler:1.0-${essentialBranch}-SNAPSHOT" - essential "com.fr.cbb:fine-function:1.0-${essentialBranch}-SNAPSHOT" - essential "com.fr.cbb:fine-sql:1.0-${essentialBranch}-SNAPSHOT" +// 主体代码与essential的对应关系配置在TeamCity +String essentialVersion = findProperty("essentialVersion") +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' diff --git a/build.third_step2.gradle b/build.third_step2.gradle index 7b50ca71e..9c0401242 100644 --- a/build.third_step2.gradle +++ b/build.third_step2.gradle @@ -71,24 +71,12 @@ if(indexV != -1){ version= branchName } -// 主体代码与CBB的对应关系 -String essentialBranch -switch (version) { - case "FEATURE": - case "RESEARCH": - essentialBranch = "FEATURE" - break - case "RELEASE": - case "BUGFIX": - essentialBranch = "RELEASE" - break - default: - essentialBranch = "MASTER" -} +// 主体代码与essential的对应关系配置在TeamCity +String essentialVersion = findProperty("essentialVersion") //指定依赖 dependencies{ - compileOnly "com.fr.essential:fine-essential:1.0-${essentialBranch}-SNAPSHOT" + compileOnly "com.fr.essential:fine-essential:${essentialVersion}" compile fileTree(dir:"${srcDir}/fine-byte-buddy/lib",include:'**/*.jar') compile fileTree(dir:"${srcDir}/fine-commons-fileupload/lib",include:'**/*.jar') compile fileTree(dir:"${srcDir}/fine-httpcomponents/http-client/lib",include:'**/*.jar') diff --git a/build.third_step3.gradle b/build.third_step3.gradle index 9f68a329e..f0a827de5 100644 --- a/build.third_step3.gradle +++ b/build.third_step3.gradle @@ -54,25 +54,12 @@ if(indexV != -1){ version= branchName } -// 主体代码与CBB的对应关系 -String essentialBranch -switch (version) { - case "FEATURE": - case "RESEARCH": - essentialBranch = "FEATURE" - break - case "RELEASE": - case "BUGFIX": - essentialBranch = "RELEASE" - break - default: - essentialBranch = "MASTER" -} - +// 主体代码与essential的对应关系配置在TeamCity +String essentialVersion = findProperty("essentialVersion") //指定依赖 dependencies{ - compileOnly "com.fr.essential:fine-essential:1.0-${essentialBranch}-SNAPSHOT" + compileOnly "com.fr.essential:fine-essential:${essentialVersion}" compile fileTree(dir:"${srcDir}/fine-jboss-logging/lib",include:'**/*.jar') compile fileTree(dir:"${srcDir}/build/libs/",include:'**/*.jar') compile fileTree(dir:System.getenv("JAVA_HOME"),include:"lib/tools.jar") diff --git a/build.third_step4.gradle b/build.third_step4.gradle index ee70404e8..9c9b696cb 100644 --- a/build.third_step4.gradle +++ b/build.third_step4.gradle @@ -54,24 +54,12 @@ if(indexV != -1){ version= branchName } -// 主体代码与CBB的对应关系 -String essentialBranch -switch (version) { - case "FEATURE": - case "RESEARCH": - essentialBranch = "FEATURE" - break - case "RELEASE": - case "BUGFIX": - essentialBranch = "RELEASE" - break - default: - essentialBranch = "MASTER" -} +// 主体代码与essential的对应关系配置在TeamCity +String essentialVersion = findProperty("essentialVersion") //指定依赖 dependencies{ - compileOnly "com.fr.essential:fine-essential:1.0-${essentialBranch}-SNAPSHOT" + compileOnly "com.fr.essential:fine-essential:${essentialVersion}" // compile fileTree(dir:"${srcDir}/fine-hibernate/lib",include:'**/*.jar') compile fileTree(dir:"${srcDir}/fine-spring/lib",include:'**/*.jar') compile fileTree(dir:"${srcDir}/build/libs/",include:'**/*.jar') diff --git a/build.third_step5.gradle b/build.third_step5.gradle index e1bac0140..ebe8bc015 100644 --- a/build.third_step5.gradle +++ b/build.third_step5.gradle @@ -54,24 +54,12 @@ if(indexV != -1){ version= branchName } -// 主体代码与CBB的对应关系 -String essentialBranch -switch (version) { - case "FEATURE": - case "RESEARCH": - essentialBranch = "FEATURE" - break - case "RELEASE": - case "BUGFIX": - essentialBranch = "RELEASE" - break - default: - essentialBranch = "MASTER" -} +// 主体代码与essential的对应关系配置在TeamCity +String essentialVersion = findProperty("essentialVersion") //指定依赖 dependencies{ - compileOnly "com.fr.essential:fine-essential:1.0-${essentialBranch}-SNAPSHOT" + compileOnly "com.fr.essential:fine-essential:${essentialVersion}" compile fileTree(dir:"${srcDir}/fine-hibernate/lib",include:'**/*.jar') // compile fileTree(dir:"${srcDir}/fine-spring/lib",include:'**/*.jar') compile fileTree(dir:"${srcDir}/build/libs/",include:'**/*.jar') diff --git a/build.third_step6.gradle b/build.third_step6.gradle index 702fcf2c5..e7bb4bc44 100644 --- a/build.third_step6.gradle +++ b/build.third_step6.gradle @@ -52,24 +52,12 @@ if(indexV != -1){ version= branchName } -// 主体代码与CBB的对应关系 -String essentialBranch -switch (version) { - case "FEATURE": - case "RESEARCH": - essentialBranch = "FEATURE" - break - case "RELEASE": - case "BUGFIX": - essentialBranch = "RELEASE" - break - default: - essentialBranch = "MASTER" -} +// 主体代码与essential的对应关系配置在TeamCity +String essentialVersion = findProperty("essentialVersion") //指定依赖 dependencies{ - compileOnly "com.fr.essential:fine-essential:1.0-${essentialBranch}-SNAPSHOT" + compileOnly "com.fr.essential:fine-essential:${essentialVersion}" compile fileTree(dir:"${srcDir}/fine-druid/lib",include:'ojdbc7-12.1.0.jar') compile fileTree(dir:"${srcDir}/fine-druid/lib",include:'**/*.jar') compile fileTree(dir:"${srcDir}/fine-socketio/lib",include:'**/*.jar') diff --git a/build.third_step7.gradle b/build.third_step7.gradle index 0ec3d15a2..99d69af27 100644 --- a/build.third_step7.gradle +++ b/build.third_step7.gradle @@ -52,24 +52,12 @@ if(indexV != -1){ version= branchName } -// 主体代码与CBB的对应关系 -String essentialBranch -switch (version) { - case "FEATURE": - case "RESEARCH": - essentialBranch = "FEATURE" - break - case "RELEASE": - case "BUGFIX": - essentialBranch = "RELEASE" - break - default: - essentialBranch = "MASTER" -} +// 主体代码与essential的对应关系配置在TeamCity +String essentialVersion = findProperty("essentialVersion") //指定依赖 dependencies{ - compileOnly "com.fr.essential:fine-essential:1.0-${essentialBranch}-SNAPSHOT" + compileOnly "com.fr.essential:fine-essential:${essentialVersion}" compile fileTree(dir:"${srcDir}/build/libs/",include:'**/*.jar') compile fileTree(dir:System.getenv("JAVA_HOME"),include:"lib/tools.jar") compile group: "javax.servlet", name: "javax.servlet-api", version: "3.0.1" From 1f7e8016bde0ec62a1a7c6af11319223d608b6a8 Mon Sep 17 00:00:00 2001 From: "Cloud.Liu" Date: Fri, 16 Apr 2021 20:50:15 +0800 Subject: [PATCH 2/3] =?UTF-8?q?DEC-17833=20feat:=20CBB=E7=8B=AC=E7=AB=8B?= =?UTF-8?q?=E5=8F=91=E5=B8=83=20third=E6=89=93=E5=8C=85=E8=84=9A=E6=9C=AC?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.third_step0.gradle | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/build.third_step0.gradle b/build.third_step0.gradle index 0c78f0285..c645ec92a 100644 --- a/build.third_step0.gradle +++ b/build.third_step0.gradle @@ -99,7 +99,7 @@ publishing { third_build(MavenPublication) { groupId "com.fr.third" - artifactId "fine-third" + artifactId project.hasProperty("withCBB") ? "fine-third-without-cbb" : "fine-third" version maven_version_build ext.repo = 'snapshot' from components.java @@ -169,12 +169,17 @@ task unpack(type:Copy) { // 将essential依赖等级的jar全部解压到classes下 task unpackEssential(type:Copy) { - for (File file : configurations.essential.files) { - from zipTree(file) + if (project.hasProperty("withCBB")) { + println "withCBB" + for (File file : configurations.essential.files) { + from zipTree(file) + } + into classesDir + } else { + println "withoutCBB" } - into classesDir } unpackEssential.dependsOn unpack -jar.dependsOn unpackEssential +jar.dependsOn unpackEssential \ No newline at end of file From 4ac355642842e5f240635975451e0b38125bb8a4 Mon Sep 17 00:00:00 2001 From: "Cloud.Liu" Date: Fri, 16 Apr 2021 21:24:07 +0800 Subject: [PATCH 3/3] =?UTF-8?q?DEC-17833=20fix:=20CBB=E7=8B=AC=E7=AB=8B?= =?UTF-8?q?=E5=8F=91=E5=B8=83=20third=E6=89=93=E5=8C=85=E8=84=9A=E6=9C=AC?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=20withCBB=E5=86=99=E5=8F=8D=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.third_step0.gradle | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/build.third_step0.gradle b/build.third_step0.gradle index c645ec92a..4621f51c5 100644 --- a/build.third_step0.gradle +++ b/build.third_step0.gradle @@ -99,7 +99,7 @@ publishing { third_build(MavenPublication) { groupId "com.fr.third" - artifactId project.hasProperty("withCBB") ? "fine-third-without-cbb" : "fine-third" + artifactId project.hasProperty("withCBB") ? "fine-third" : "fine-third-without-cbb" version maven_version_build ext.repo = 'snapshot' from components.java @@ -170,13 +170,10 @@ task unpack(type:Copy) { // 将essential依赖等级的jar全部解压到classes下 task unpackEssential(type:Copy) { if (project.hasProperty("withCBB")) { - println "withCBB" for (File file : configurations.essential.files) { from zipTree(file) } into classesDir - } else { - println "withoutCBB" } }