Skip to content

Publishing Artifacts to Maven

Lossy edited this page Jan 29, 2023 · 5 revisions

SNAPSHOT

  • Checkout master branch
  • Add -SNAPSHOT to the version number
  • Run ./gradlew clean build
  • Then run ./gradlew publishToSonatype

Snapshots do not need to be released.

RELEASE

  • Checkout master branch
  • Make sure to remove -SNAPSHOT from the version number
  • Run ./gradlew clean build
  • Then run ./gradlew publishToSonatype or ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository

If you choose ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository, this will close and release it automatically.

If you choose ./gradlew publishToSonatype, then finish the following:

  • Go to https://oss.sonatype.org/ and log in.
  • Go to Staging repositories
  • Select repo and close.
  • Once checking requirements is done, (refresh, )select and release it.
Clone this wiki locally