From 836aa313a3d355f2d491610a3af1bc4a472a3099 Mon Sep 17 00:00:00 2001 From: Kevin Herron Date: Sat, 24 Sep 2022 06:29:15 -0700 Subject: [PATCH] Don't sign SNAPSHOT builds --- build.gradle.kts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 32e0061..3efc829 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -117,7 +117,6 @@ publishing { password = project.findProperty("ossrhPassword") as String? } - // change URLs to point to your repos, e.g. http://my.org/repo val releasesRepoUrl = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/") val snapshotsRepoUrl = uri("https://oss.sonatype.org/content/repositories/snapshots/") url = if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl @@ -128,8 +127,10 @@ publishing { } signing { - useGpgCmd() - sign(publishing.publications["mavenJava"]) + if (!version.toString().endsWith("SNAPSHOT")) { + useGpgCmd() + sign(publishing.publications["mavenJava"]) + } } tasks.javadoc {