diff --git a/build.gradle b/build.gradle index fff6bafff..91a23bf65 100644 --- a/build.gradle +++ b/build.gradle @@ -184,7 +184,7 @@ publishing { // (created 2013) we are on the old servers (see https://issues.sonatype.org/browse/OSSRH-85469) //def releasesRepoUrl = layout.buildDirectory.dir('repos/releases') //def snapshotsRepoUrl = layoutBuildDirectory.dir('repos/snapshots') - if (version.endsWith("SNAPSHOT")) { + if (version.endsWith("-SNAPSHOT")) { println("Creating a SNAPSHOT: ${version}") url = "https://oss.sonatype.org/content/repositories/snapshots" } else { @@ -200,8 +200,10 @@ publishing { } signing { - useGpgCmd() - sign publishing.publications.mavenJava + if (!version.endsWith("-SNAPSHOT")) { + useGpgCmd() + sign publishing.publications.mavenJava + } } // javadoc {