Skip to content

Commit d95b064

Browse files
committed
artifact signing
1 parent c6c7dae commit d95b064

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

build.gradle

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
apply plugin: 'java'
22
apply plugin: 'maven'
33
apply plugin: 'maven-publish'
4-
4+
apply plugin: 'signing'
55

66
group = 'com.unquietcode.tools.spring'
77
version = '4.1.4'
88
sourceCompatibility = 1.7
99

10+
1011
task wrapper(type: Wrapper) {
11-
gradleVersion = '2.2.1'
12-
distributionUrl = 'http://services.gradle.org/distributions/gradle-2.2.1-all.zip'
12+
gradleVersion = '2.3'
1313
}
1414

15-
1615
task sourcesJar(type: Jar, dependsOn: classes) {
1716
classifier = 'sources'
1817
from sourceSets.main.allSource
@@ -28,6 +27,10 @@ artifacts {
2827
archives javadocJar
2928
}
3029

30+
def AorB = { String a, String b ->
31+
return a != null && !a.trim().isEmpty() ? a : b;
32+
}
33+
3134
publishing {
3235
publications {
3336
mavenJava(MavenPublication) {
@@ -39,7 +42,11 @@ publishing {
3942

4043
repositories {
4144
maven {
42-
url "$buildDir/repo"
45+
url AorB(System.getProperty("maven.deploy.repository"), "$buildDir/repo")
4346
}
4447
}
48+
}
49+
50+
signing {
51+
sign configurations.archives
4552
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Mon Jan 19 10:28:51 PST 2015
1+
#Tue Mar 31 09:41:37 PDT 2015
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=http\://services.gradle.org/distributions/gradle-2.2.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-2.3-bin.zip

0 commit comments

Comments
 (0)