Browse Source

Merge pull request #5007 in CORE/base-third from release/11.0 to feature/x

* commit 'b4b6ccfb98de625bbef040e286135d52b9688a45':
  KERNEL-9267 拆分third.jar为third.jar + cbb.jar
feature/x
superman 3 years ago
parent
commit
93e8f796a9
  1. 56
      build.third_step0-jdk11.gradle
  2. 114
      build.third_step0.gradle

56
build.third_step0-jdk11.gradle

@ -7,7 +7,7 @@ tasks.withType(JavaCompile){
} }
configurations.all { configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, 'seconds' resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
} }
// //
sourceCompatibility=11 sourceCompatibility=11
@ -24,8 +24,8 @@ jar{
} }
repositories { repositories {
mavenCentral() mavenCentral()
maven { url "http://mvn.finedevelop.com/repository/maven-public/" } maven { url "http://mvn.finedevelop.com/repository/maven-public/" }
maven { url "http://mvn.finedevelop.com/repository/fanruan/" } maven { url "http://mvn.finedevelop.com/repository/fanruan/" }
} }
@ -52,7 +52,7 @@ def maven_version="${version}-${MVN_BRANCH}-SNAPSHOT"
def jar_version = version def jar_version = version
configurations { configurations {
// thirdjar // thirdjar
// sigar // sigar
essential essential
} }
@ -63,32 +63,32 @@ String essentialVersion = findProperty("essentialVersion")
// //
dependencies{ dependencies{
compileOnly "com.fr.essential:fine-essential:${essentialVersion}" compileOnly "com.fr.essential:fine-essential:${essentialVersion}"
// thirdjar "com.fr.third:fine-third-base:10.0-BASE-SNAPSHOT" // thirdjar "com.fr.third:fine-third-base:10.0-BASE-SNAPSHOT"
// sigar "com.fr.third:sigar:1.6.0" // sigar "com.fr.third:sigar:1.6.0"
testCompile 'junit:junit:4.12' testCompile 'junit:junit:4.12'
} }
publishing { publishing {
publications { publications {
third(MavenPublication) { third(MavenPublication) {
groupId "com.fr.third" groupId "com.fr.third"
artifactId "fine-third" artifactId "fine-third"
version maven_version version maven_version
from components.java from components.java
} }
} }
repositories { repositories {
maven { maven {
url "http://mvn.finedevelop.com/repository/fanruan/" url "http://mvn.finedevelop.com/repository/fanruan/"
credentials { credentials {
username = findProperty("NEXUS_USERNAME") username = findProperty("NEXUS_USERNAME")
password = findProperty("NEXUS_PASSWORD") password = findProperty("NEXUS_PASSWORD")
} }
} }
} }
} }
task unpack(type:Copy) { task unpack(type:Copy) {
@ -118,18 +118,8 @@ task unpack(type:Copy) {
zipTree(file) zipTree(file)
} }
} }
}
// essential依赖等级的jar全部解压到classes下
task unpackEssential(type:Copy) {
for (File file : configurations.essential.files) {
from zipTree(file)
}
into classesDir
} }
jar.dependsOn unpackEssential
jar.dependsOn unpack jar.dependsOn unpack

114
build.third_step0.gradle

@ -7,7 +7,7 @@ tasks.withType(JavaCompile){
} }
configurations.all { configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, 'seconds' resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
} }
// //
sourceCompatibility=1.8 sourceCompatibility=1.8
@ -23,8 +23,8 @@ jar{
} }
repositories { repositories {
mavenCentral() mavenCentral()
maven { url "http://mvn.finedevelop.com/repository/maven-public/" } maven { url "http://mvn.finedevelop.com/repository/maven-public/" }
maven { url "http://mvn.finedevelop.com/repository/fanruan/" } maven { url "http://mvn.finedevelop.com/repository/fanruan/" }
} }
@ -54,11 +54,11 @@ def indexV = branchName.indexOf( "%2F");
String branchNameUpperCase = "RELEASE" String branchNameUpperCase = "RELEASE"
if(indexV != -1){ if(indexV != -1){
version= branchName.substring(indexV+3, branchName.length()).toUpperCase() version= branchName.substring(indexV+3, branchName.length()).toUpperCase()
branchNameUpperCase = branchName.substring(0, indexV).toUpperCase() branchNameUpperCase = branchName.substring(0, indexV).toUpperCase()
maven_version_build = project.version +"-" + branchNameUpperCase +"-SNAPSHOT" maven_version_build = project.version +"-" + branchNameUpperCase +"-SNAPSHOT"
} else { } else {
version= branchName version= branchName
maven_version_build = project.version +"-SNAPSHOT" maven_version_build = project.version +"-SNAPSHOT"
} }
@ -66,7 +66,7 @@ def maven_version="${version}.${formattedDate}"
def jar_version = version def jar_version = version
configurations { configurations {
// thirdjar // thirdjar
// sigar // sigar
essential essential
} }
@ -78,64 +78,61 @@ String cbbVersion = findProperty("cbbVersion")
// //
dependencies{ dependencies{
essential "com.fr.essential:fine-essential:${essentialVersion}" essential "com.fr.essential:fine-essential:${essentialVersion}"
essential "com.fr.cbb:fine-scheduler:${cbbVersion}" // thirdjar "com.fr.third:fine-third-base:10.0-BASE-SNAPSHOT"
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" // sigar "com.fr.third:sigar:1.6.0"
testCompile 'junit:junit:4.12' testCompile 'junit:junit:4.12'
} }
publishing { publishing {
publications { publications {
third(MavenPublication) { third(MavenPublication) {
groupId "com.fr.third" groupId "com.fr.third"
artifactId "fine-third" artifactId "fine-third"
version maven_version version maven_version
ext.repo = 'release' ext.repo = 'release'
from components.java from components.java
} }
third_build(MavenPublication) { third_build(MavenPublication) {
groupId "com.fr.third" groupId "com.fr.third"
artifactId project.hasProperty("withCBB") ? "fine-third" : "fine-third-without-cbb" artifactId "fine-third"
version maven_version_build version maven_version_build
ext.repo = 'snapshot' ext.repo = 'snapshot'
from components.java from components.java
} }
} }
repositories { repositories {
maven { maven {
name "release" name "release"
url "http://mvn.finedevelop.com/repository/fanruan-release/" url "http://mvn.finedevelop.com/repository/fanruan-release/"
credentials { credentials {
username = findProperty("NEXUS_USERNAME") username = findProperty("NEXUS_USERNAME")
password = findProperty("NEXUS_PASSWORD") password = findProperty("NEXUS_PASSWORD")
} }
} }
maven { maven {
name "snapshot" name "snapshot"
url "http://mvn.finedevelop.com/repository/fanruan/" url "http://mvn.finedevelop.com/repository/fanruan/"
credentials { credentials {
username = findProperty("NEXUS_USERNAME") username = findProperty("NEXUS_USERNAME")
password = findProperty("NEXUS_PASSWORD") password = findProperty("NEXUS_PASSWORD")
} }
} }
} }
} }
afterEvaluate { afterEvaluate {
tasks.withType(PublishToMavenRepository) { task -> tasks.withType(PublishToMavenRepository) { task ->
if (task.publication.hasProperty('repo') && task.publication.repo != task.repository.name) { if (task.publication.hasProperty('repo') && task.publication.repo != task.repository.name) {
task.enabled = false task.enabled = false
task.group = null task.group = null
} }
} }
} }
task unpack(type:Copy) { task unpack(type:Copy) {
@ -167,19 +164,4 @@ task unpack(type:Copy) {
} }
} }
// essential依赖等级的jar全部解压到classes下 jar.dependsOn unpack
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
Loading…
Cancel
Save