File tree Expand file tree Collapse file tree 2 files changed +15
-10
lines changed
Expand file tree Collapse file tree 2 files changed +15
-10
lines changed Original file line number Diff line number Diff line change 1+ // Copyright 2022, Backblaze Inc. All Rights Reserved.
2+ // License https://www.backblaze.com/using_b2_code.html
3+
14plugins {
25 id(" io.github.gradle-nexus.publish-plugin" ) version " 1.1.0"
36}
Original file line number Diff line number Diff line change @@ -146,18 +146,20 @@ val sonatypePassword = findProperty("sonatypePassword")
146146val gpgSigningKey = System .getenv(" GPG_SIGNING_KEY" )
147147val gpgPassphrase = System .getenv(" GPG_PASSPHRASE" )
148148
149- signing {
150- setRequired {
151- gradle.taskGraph.hasTask(" publishToSonatype" ) || gradle.taskGraph.hasTask(" createBundle" )
152- }
149+ if (sonatypeUsername != null && sonatypePassword != null ) {
150+ signing {
151+ setRequired {
152+ gradle.taskGraph.hasTask(" publishToSonatype" ) || gradle.taskGraph.hasTask(" createBundle" )
153+ }
153154
154- if (gpgSigningKey != null && gpgPassphrase != null ) {
155- useInMemoryPgpKeys(gpgSigningKey, gpgPassphrase)
156- } else {
157- useGpgCmd()
158- }
155+ if (gpgSigningKey != null && gpgPassphrase != null ) {
156+ useInMemoryPgpKeys(gpgSigningKey, gpgPassphrase)
157+ } else {
158+ useGpgCmd()
159+ }
159160
160- sign(publishing.publications[" maven" ])
161+ sign(publishing.publications[" maven" ])
162+ }
161163}
162164
163165tasks.register<Jar >(" createBundle" ) {
You can’t perform that action at this time.
0 commit comments