Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Gradle: Ensure maven artifacts are signed.
Log a warning if the signing keys are missing. JAVA-5872
  • Loading branch information
rozza committed May 6, 2025
commit 3c8e560959badb74c7c256eb1bcf22fc16f40f84
3 changes: 3 additions & 0 deletions buildSrc/src/main/kotlin/conventions/publishing.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ signing {
if (signingKey.isPresent && signingPassword.isPresent) {
logger.debug("[${project.displayName}] Signing is enabled")
useInMemoryPgpKeys(signingKey.get(), signingPassword.get())
sign(publishing.publications["maven"])
} else {
logger.warn("[${project.displayName}] No Signing keys found, skipping signing configuration")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's make both the logging statements info, since it's normal to publish to the local repository without signing, and Sonatype won't let us release without signatures anyway.

}
}

Expand Down