Skip to content

Commit 113939a

Browse files
committed
Conditional signing.
1 parent cf466c4 commit 113939a

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

build.gradle

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
apply plugin: 'java'
2-
apply plugin: 'idea'
1+
plugins {
2+
id 'java-library'
3+
id 'signing'
4+
id 'maven-publish'
5+
id('io.github.gradle-nexus.publish-plugin') version '1.1.0'
6+
}
37

48
repositories {
59
mavenCentral()
@@ -112,6 +116,8 @@ publishing {
112116
}
113117
}
114118

115-
signing {
116-
sign publishing.publications.mavenJava
119+
if (project.hasProperty("signing.keyId")) {
120+
signing {
121+
sign publishing.publications.mavenJava
122+
}
117123
}

0 commit comments

Comments
 (0)