From 819847be4b464423612151f3e06f5c464ce9b47b Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Tue, 14 Apr 2020 15:21:13 +0200 Subject: [PATCH] gradle: use gpg (agent) for signing --- build.gradle | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index fbf325a5..bc1db1ef 100644 --- a/build.gradle +++ b/build.gradle @@ -60,7 +60,7 @@ allprojects { builtDate = (new SimpleDateFormat("yyyy-MM-dd")).format(new Date()) isContinuousIntegrationEnvironment = Boolean.parseBoolean(System.getenv('CI')) isReleaseVersion = !isSnapshot - signingRequired = isReleaseVersion + signingRequired = !(isSnapshot || isContinuousIntegrationEnvironment) sonatypeCredentialsAvailable = project.hasProperty('sonatypeUsername') && project.hasProperty('sonatypePassword') sonatypeSnapshotUrl = 'https://oss.sonatype.org/content/repositories/snapshots' sonatypeStagingUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2' @@ -162,6 +162,7 @@ subprojects { } signing { + useGpgCmd() required { signingRequired } sign publishing.publications.mavenJava }