Skip to content

Commit 2d50c32

Browse files
committed
Ensure "publishToMavenLocal" task works (required for reproducible build verification)
1 parent 32b9ef7 commit 2d50c32

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

build.gradle

+6
Original file line numberDiff line numberDiff line change
@@ -157,3 +157,9 @@ publishing {
157157
signing {
158158
sign publishing.publications.mavenJava
159159
}
160+
161+
tasks.withType(Sign) {
162+
// reproducible builds use "publishToMavenLocal" and need to be able to publish locally without signing,
163+
// so we always sign when publishing to Maven Central, but *not* when publishing to the local Maven repo
164+
onlyIf { gradle.taskGraph.hasTask(':publish') }
165+
}

0 commit comments

Comments
 (0)