Skip to content
Horace Li edited this page Jan 29, 2021 · 8 revisions

Publishing

Prerequisites

  • Bintray Account
  • Sonatype Account
    • Create account at Sonatype Jira
    • Ask an existing maintainer to add user to com.globalreachtech by raising a ticket
    • Login to Nexus with same credentials
    • Make note of User Token key and password from profile settings

Publishing to JCenter

  • Ensure current build passes
  • Remove -SNAPSHOT from version in build.gradle
  • Run Gradle bintrayUpload task with following environment variables
    • BINTRAY_USER - username
    • BINTRAY_KEY - Bintray API key
  • Go to the package page on Bintray web console - it should prompt you to publish the latest version

Publishing to Maven Central

  • Ensure latest version is published on JCenter already
  • Go to the Maven Central tab on the package page
    • 'Go to Old Look' on the top banner if the tab doesn't show or redirects elsewhere
  • If form isn't already filled with defaults, use your Sonatype key and password and 'Sync'
    • Check Close and release repository when done.

Version Bumping

  • Commit with the version field in build.gradle set to the released version
    • Tag said commit in format v1.x.x
  • Make a new commit, bumping the version field in build.gradle to the next version with -SNAPSHOT suffix
    • Push both commits, ensuring tags are also pushed
  • On the releases page, draft and publish a new release
    • Ensure the release title and referred tag version match
    • Add list of changes
Clone this wiki locally