signAllPublications

Automatically apply Gradle's signing plugin and configure all publications to be signed. If signing credentials are not configured this will fail the build unless the current version is a SNAPSHOT.

Signing can be done using a local secring.gpg by setting these Gradle properties:

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

Alternatively an in memory key can be used by exporting an ascii-armored GPG key and setting these Gradle properties:

signingInMemoryKey=exported_ascii_armored_key
# optional
signingInMemoryKeyId=24875D73
# if key was created with a password
signingInMemoryKeyPassword=secret

gpg2 --export-secret-keys --armor KEY_ID can be used to export they key for this. The exported key is taken without the first line and without the last 2 lines, all line breaks should be removed as well. The in memory properties can also be provided as environment variables by prefixing them with ORG_GRADLE_PROJECT_, e.g. ORG_GRADLE_PROJECT_signingInMemoryKey.

More information about signing as well as different ways to provide credentials can be found in the Gradle documentation