-
Notifications
You must be signed in to change notification settings - Fork 191
Publishing with Sonatype
First, follow the instructions for installing GPG and creating a key file. You will need a version of GPG < 2.1.
Once you've done that, you should create a gradle.properties
file your ~/.gradle
directory with the following properties to avoid specifying the same information every time you want to publish:
signing.keyId=<YourKeyId>
signing.password=<YourPublicKeyPassword>
signing.secretKeyRingFile=<PathToYourKeyRingFile>
ossrhUsername=<your-jira-id>
ossrhPassword=<your-jira-password>
After that, you should be able to run the gradle uploadArchives
task successfully.
To publish a snapshot to Sonatype, just make sure that the version number ends in -SNAPSHOT
; to avoid doing so, just make sure it doesn't.
You can then manage your builds (you may need to log in first). If you want to publish a release, click Staging Repositories on the left sidebar under the Build Promotion header, find the repository you want to release, select it, and then click the Release button near the top of the page (other buttons near it include Drop, Refresh, Close, and Promote). Your build should be published shortly afterward, although it may not be visible via Maven search for another couple of hours.