Skip to content

Commit

Permalink
Don't sign SNAPSHOT builds
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinherron committed Sep 24, 2022
1 parent c71e2b2 commit 836aa31
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -128,8 +127,10 @@ publishing {
}

signing {
useGpgCmd()
sign(publishing.publications["mavenJava"])
if (!version.toString().endsWith("SNAPSHOT")) {
useGpgCmd()
sign(publishing.publications["mavenJava"])
}
}

tasks.javadoc {
Expand Down

0 comments on commit 836aa31

Please sign in to comment.