- Bump the VERSION_NAME property in
gradle.properties
based on Major.Minor.Patch naming scheme - Update
CHANGELOG.md
for the impending release. git commit -am "Prepare for release X.Y.Z."
(where X.Y.Z is the version you set in step 1)- Add your sonatype login information under gradle properties mavenCentralUsername and mavenCentralPassword in your local user gradle.properties file
- Make sure you have a gpg signing key configured (https://vanniktech.github.io/gradle-maven-publish-plugin/central/#secrets)
./gradlew publishAllPublicationsToMavenCentral --no-configuration-cache
to build the artifacts and publish them to maven- Open PR on Github, merge, and publish release through Github UI.
To publish an internal release to an Artifactory repository:
- Set credential values for ARTIFACTORY_USERNAME and ARTIFACTORY_PASSWORD in your local gradle.properties
- Set values for ARTIFACTORY_RELEASE_URL (and optionally ARTIFACTORY_SNAPSHOT_URL if you are publishing a snapshot)
- ./gradlew publishAllPublicationsToAirbnbArtifactoryRepository -PdoNotSignRelease=true --no-configuration-cache
- "-PdoNotSignRelease=true" is optional, but we don't need to sign artifactory releases and this allows everyone to publish without setting up a gpg key
If you need to publish to a different repository, look at the configuration in 'publishing.gradle' to see how to configure additional repositories.
If testing changes locally, you can install to mavenLocal via ./gradlew publishToMavenLocal