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