Skip to content

Commit 723b838

Browse files
authored
Qualifier! (not classifier ;-)
1 parent 2b5b255 commit 723b838

File tree

1 file changed

+14
-18
lines changed

1 file changed

+14
-18
lines changed

deployment/bintray-deploy.gradle

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ project.ext.getDeploymentVersion = {
66
if (!tmpDeploymentVersion.matches("\\d+\\.\\d+\\.\\d+")) {
77
throw new RuntimeException("Version is not valid. Correct format is like 1.0.2 but was " + tmpDeploymentVersion)
88
}
9+
10+
def qualifier = System.getProperty('qualifier');
11+
if (qualifier != null) {
12+
println "Using qualifier '" + qualifier +"' for deployment";
13+
tmpDeploymentVersion = tmpDeploymentVersion + "-" + qualifier;
14+
}
915
return tmpDeploymentVersion;
1016
}
1117

@@ -75,26 +81,16 @@ publishing {
7581
groupId project['POM.groupId']
7682
artifactId project['POM.artifactId']
7783
version getDeploymentVersion()
78-
79-
def jarClassifier = System.getProperty('classifier');
80-
if (jarClassifier != null) {
81-
println "Using classifier '" + jarClassifier +"' for deployment";
82-
artifact(jar) {
83-
classifier jarClassifier
84-
}
85-
} else {
86-
from components.java
87-
}
8884

89-
if (!(System.getProperty('publish.jar.only') ?: false)) {
90-
artifact sourcesJar
91-
artifact javadocJar
85+
from components.java
86+
87+
artifact sourcesJar
88+
artifact javadocJar
9289

93-
pom.withXml {
94-
asNode().appendNode('description', project['POM.description'])
95-
asNode().appendNode('name', "${project['POM.groupId']}:${project['POM.artifactId']}")
96-
asNode().children().last() + pomExtraInfo
97-
}
90+
pom.withXml {
91+
asNode().appendNode('description', project['POM.description'])
92+
asNode().appendNode('name', "${project['POM.groupId']}:${project['POM.artifactId']}")
93+
asNode().children().last() + pomExtraInfo
9894
}
9995
}
10096
}

0 commit comments

Comments
 (0)