Instructions for library publishing

Make sure that you have permissions to publish in Yubico’s Sonatype group. Generate User token at https://central.sonatype.com/account.

Make sure that you put your credentials into:

> ~/.gradle/gradle.properties

Example gradle.properties:

signing.gnupg.executable=gpg
signing.gnupg.keyName=<your_gpg_key_id>
sonatype.username=<your_username>
sonatype.password=<your_password>

Make sure that you have the desired library version values in the top level

> build.gradle

example:

subprojects {
    version = '1.0.0-SNAPSHOT'
}

Suffix -SNAPSHOT allows you to deploy different version on top of what was already deployed.

As a dry run, publish to your local Maven repository ($HOME/.m2/):

./gradlew publishToMavenLocal

Run this command in Terminal to push to Sonatype staging repository:

./gradlew publish finalizeCentralPublication

Publishing can also be done for a single module:

./gradlew modulename:publish finalizeCentralPublication

Publish the deployment through https://central.sonatype.com/publishing.

For any OSSRH Staging API service issues visit https://ossrh-staging-api.central.sonatype.com/swagger-ui/#/ to review the repository.

When building release, gradle will by default execute signing tasks. When this is not desired, for example during CI builds, it is possible to disable signing with NO_GPG_SIGN env variable set to true.

NO_GPG_SIGN=true ./gradlew publishToMaven