Skip to content

Commit

Permalink
Merge pull request #768 from jonbullock/fix/maven-central-signing
Browse files Browse the repository at this point in the history
Fixed signing for publishing to Maven Central
  • Loading branch information
jonbullock authored Sep 21, 2022
2 parents 5b1163e + 8341bd1 commit 38ed80d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
15 changes: 15 additions & 0 deletions gradle/signing.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
if ( !project.hasProperty('skipSigning') ) {
apply plugin: 'signing'

if (!signing.signatory) {
logger.warn "No Signatory configured for project $project.name. Skip signing! See https://docs.gradle.org/current/userguide/signing_plugin.html"
ext.skipSigning = true
}
else {
if ( project.name != "jbake-dist" ) {
signing {
sign publishing.publications.mavenJava
}
}
}
}
1 change: 1 addition & 0 deletions jbake-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ plugins {
}

apply from: "$rootDir/gradle/maven-publishing.gradle"
apply from: "$rootDir/gradle/signing.gradle"

description = "The core library of JBake"

Expand Down
1 change: 1 addition & 0 deletions jbake-maven-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ mavenPlugin {
}

apply from: "$rootDir/gradle/maven-publishing.gradle"
apply from: "$rootDir/gradle/signing.gradle"

publishing {
publications {
Expand Down

0 comments on commit 38ed80d

Please sign in to comment.