Skip to content

Commit

Permalink
Merge pull request #25 from woltapp/require-signing-only-when-publish…
Browse files Browse the repository at this point in the history
…ing-remotely

require signing only when publishing remotely
  • Loading branch information
nkly-wolt authored Aug 26, 2024
2 parents 8d7b5a4 + c17701d commit 82fa3dd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,14 @@ publishing {
}
}

val isReleaseVersion = !version.toString().endsWith("-SNAPSHOT")

signing {
setRequired {
// signing is required if this is a release version and the artifacts are to be published
isReleaseVersion && gradle.taskGraph.allTasks.any { it is PublishToMavenRepository }
}

val signingKey: String? by project
val signingPassword: String? by project
useInMemoryPgpKeys(signingKey, signingPassword)
Expand Down

0 comments on commit 82fa3dd

Please sign in to comment.