Browse Source

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

* commit '8f3af8c0c42ee00e3d0ed0989bb15415c64dbd69':
  KERNEL-9267 chore: 修改打包脚本
feature/x
superman 3 years ago
parent
commit
5b1430f544
  1. 47
      build.third_step0.gradle

47
build.third_step0.gradle

@ -47,7 +47,7 @@ def date = new Date()
def formattedDate = date.format('yyyy.MM.dd')
def srcDir="."
def maven_version_build = ""
def maven_version = ""
def indexV = branchName.indexOf( "%2F");
// "FEATURE", "RELEASE"
@ -56,13 +56,13 @@ String branchNameUpperCase = "RELEASE"
if(indexV != -1){
version= branchName.substring(indexV+3, branchName.length()).toUpperCase()
branchNameUpperCase = branchName.substring(0, indexV).toUpperCase()
maven_version_build = project.version +"-" + branchNameUpperCase +"-SNAPSHOT"
maven_version = project.version +"-" + branchNameUpperCase +"-SNAPSHOT"
} else {
version= branchName
maven_version_build = project.version +"-SNAPSHOT"
maven_version = project.version +"-SNAPSHOT"
}
def maven_version="${version}.${formattedDate}"
//def maven_version="${version}.${formattedDate}"
def jar_version = version
configurations {
@ -90,45 +90,18 @@ publishing {
groupId "com.fr.third"
artifactId "fine-third"
version maven_version
ext.repo = 'release'
from components.java
pom.withXml {
def dep = asNode().appendNode('dependencies');
def node = dep.appendNode("dependency")
node.appendNode("groupId", "com.fr.cbb")
node.appendNode("artifactId", "fine-cbb")
node.appendNode("version", "${cbbVersion}")
}
}
third_build(MavenPublication) {
groupId "com.fr.third"
artifactId "fine-third"
version maven_version_build
ext.repo = 'snapshot'
from components.java
pom.withXml {
def dep = asNode().appendNode('dependencies');
def node = dep.appendNode("dependency")
node.appendNode("groupId", "com.fr.cbb")
node.appendNode("artifactId", "fine-cbb")
node.appendNode("version", "${cbbVersion}")
node.appendNode("version", "${maven_version}")
}
}
}
repositories {
maven {
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")
@ -139,16 +112,6 @@ publishing {
}
}
afterEvaluate {
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) {
delete classesDir
destinationDir=file(classesDir)

Loading…
Cancel
Save