Skip to content

Commit fbee4b5

Browse files
committed
Configure signing properties
1 parent c0e01ab commit fbee4b5

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
projectVersion=4.0.10-SNAPSHOT
1+
projectVersion=4.0.11-SNAPSHOT
22
grailsVersion=4.0.10
33
springBootVersion=2.1.18.RELEASE
44
groovyVersion=2.5.14

src/main/groovy/org/grails/gradle/plugin/publishing/internal/GrailsCentralPublishGradlePlugin.groovy

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import org.gradle.plugins.signing.SigningPlugin
3333

3434
import static com.bmuschko.gradle.nexus.NexusPlugin.getSIGNING_KEY_ID
3535
import static com.bmuschko.gradle.nexus.NexusPlugin.getSIGNING_PASSWORD
36+
import static com.bmuschko.gradle.nexus.NexusPlugin.getSIGNING_KEYRING
3637

3738
/**
3839
* A plugin to setup publishing to Grails central repo
@@ -105,12 +106,10 @@ BINTRAY_KEY=key
105106

106107
final ExtraPropertiesExtension extraPropertiesExtension = extensionContainer.findByType(ExtraPropertiesExtension)
107108

108-
if (!project.hasProperty(SIGNING_KEY_ID)) {
109-
extraPropertiesExtension.setProperty(SIGNING_KEY_ID, System.getenv("SIGNING_KEY") ?: null)
110-
}
111-
if (!project.hasProperty(SIGNING_PASSWORD)) {
112-
extraPropertiesExtension.setProperty(SIGNING_PASSWORD, System.getenv("SIGNING_PASSPHRASE") ?: null)
113-
}
109+
extraPropertiesExtension.setProperty(SIGNING_KEY_ID, project.hasProperty(SIGNING_KEY_ID) ? project[SIGNING_KEY_ID] : System.getenv("SIGNING_KEY") ?: null)
110+
extraPropertiesExtension.setProperty(SIGNING_PASSWORD, project.hasProperty(SIGNING_PASSWORD) ? project[SIGNING_PASSWORD] : System.getenv("SIGNING_PASSPHRASE") ?: null)
111+
extraPropertiesExtension.setProperty(SIGNING_KEYRING, project.hasProperty(SIGNING_KEYRING) ? project[SIGNING_KEYRING] : System.getenv("SIGNING_KEYRING") ?: null)
112+
114113

115114
project.afterEvaluate {
116115
boolean isSnapshot = project.version.endsWith("SNAPSHOT")

0 commit comments

Comments
 (0)