Skip to content

How to release an update to Maven Central

David Vavra edited this page Jul 17, 2014 · 3 revisions

Prerequisities

  • I have used following two guides, go there in case of problems:
  • Sonatype OSS Maven Repository Usage Guide
  • Publish an aar file to Maven Central with Gradle
  • I have already added most of the required configurations to the project, but you need some setup on your machine. Particularly:
  • latest Java, Git, Android SDK
  • GPG installed, public key distributed though their servers and path to the key and credentials in ~/.gradle/gradle.properties
  • add these properties: signing.keyId(short code visible for example in GPG Keychain Access on Mac), signing.password(password to GPG private key), signing.secretKeyRingFile(path to GPG file secring.gpg), nexusUsername(username to Sonatype), nexusPassword(password to Sonatype)
  • Sonatype account and permissions to the project in Sonatype.

Release an update

  • Push & pull
  • setup target version in gradle.properties in project root
  • run gradle uploadArchives in project root
  • go to Staging repositories, select repository and click Close.
  • add this repo manually to some project and test the new version of the library
  • when everything is fine, let's do the final push. Go to Staging repositories and click Release
    • artefacts will be in Maven Central in about 2 hours
  • Create release in GitHub Releases, it will create proper tag in git
Clone this wiki locally