From 4359c15c39e600feded6bd70f5930a60d03dc185 Mon Sep 17 00:00:00 2001 From: lidongy <1879087903@qq.com> Date: Thu, 24 Feb 2022 16:03:02 +0800 Subject: [PATCH] =?UTF-8?q?KERNEL-9267=20chore:=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=89=93=E5=8C=85=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.third_step0.gradle | 47 +++++----------------------------------- 1 file changed, 5 insertions(+), 42 deletions(-) diff --git a/build.third_step0.gradle b/build.third_step0.gradle index 5057b34d5..3e1be4cee 100644 --- a/build.third_step0.gradle +++ b/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)