Most of the release process is handled by the maven-publish and nexus plugin tasks. The tasks can be triggered by running "./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository" from the project's directory. A new artifact will be uploaded to the staging repository in Sonatype when "-SNAPSHOT" is not included in the version. When "-SNAPSHOT" is included, the task only updates the artifact in the snapshot repository.
See the Central website for specifics.
- Create a settings file at
$HOME/.gradle/gradle.propertieswith your sonatype username/password
SONATYPE_NEXUS_USERNAME=<YOUR-NEXUS-USERNAME>
SONATYPE_NEXUS_PASSWORD=<YOUR-NEXUS-PASSWORD>
- A working gpg-agent setup is expected.
- Update
versionin allbuild.gradlefiles in the project to the release version you want. ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepositoryto release all artifacts of all subprojects.- If only some subprojects are updated, execute the tasks for those subprojects only.
- Update
versionin allbuild.gradlefiles to the new snapshot version.