Signing required doesn't work

plugins

(Florian Kammermann) #1

I have the following build script fragment:

signing {
required { false }
sign configurations.archives
}

But gradle tries to sign the archives, even if required is set to false.

Env:
arch linux
OpenJDK Runtime Environment (build 1.8.0_92-b14)
gradle-2.13


(Florian Kammermann) #2

Here is the project where it doesn’t work https://github.com/swisspush/vertx-rest-storage.

To reproduce the failure just do:

–> ext.uploadToMavenCentral is false, but the signing task is executed.


(Stefan Oehme) #3

I followed your instructions and the build succeeds.


(Florian Kammermann) #4

What is your environment, OS / Java / gradle version?


(Stefan Oehme) #5

OS X 10.11.5
Java™ SE Runtime Environment (build 1.8.0_66-b17)
Tried Gradle 2.3 (in the repo) and 2.13 (latest release)

Have you made sure that you don’t have any init scripts that tinker with signing tasks?


(Florian Kammermann) #6

Ok, got it. Its the properties in the gradle.properties.

If I have defined the following properties in gradle.properties:

  • signing.keyId=24875D73
  • signing.password=secret
  • signing.secretKeyRingFile=/Users/me/.gnupg/secring.gpg

Then the conditional is ignored
required { false }

If the signing properties are not defined, then the conditinal will be applied.