Skip to content

Maven release flow

Ruslan Akhtyamov edited this page Sep 15, 2020 · 3 revisions

To release eventnative-java-sdk, request credentials for maven repository and configure ~/.gradle/gradle.properties with the following settings:

nexusUsername=[nexus_user]
nexusPassword=[nexus_password]

signing.keyId=[key_id]
signing.password=[gpg_password]

And add a secret gpg key to the ~/.gnupg directory.

gradle.properties contains the current version that would be released.

After configuration, navigate to eventnative-java-sdk directory and execute ./gradlew uploadArchive. This step uploads the archive to the staging repository. If everything was configured correctly, you will see Build Successful message.

After that, run ./gradlew release - that would create a new tag and increments version to the next release. The plugin asks you about the current release version (press Enter), future version (if the one plugin provides is incorrect - set one manually).

$ ./gradlew release

> Task :eventnative-java-sdk:confirmReleaseVersion

??> This release version: [0.1]  (WAITING FOR INPUT BELOW)
<=====--------> 40% EXECUTING [17s]

> Task :eventnative-java-sdk:updateVersion

??> Enter the next version (current one released as [0.1]): [0.2]  (WAITING FOR INPUT BELOW)
<===========--> 90% EXECUTING [33s]

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.6.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 38s

After that wait a little bit (about 5 minutes) and check staging repository.

If the archive has already been processed, you will see a repository at the search result window. Now it's time to promote to Maven Central. Choose the repository and click Close button. Check the Activity tab at the bottom part of the page to validate that no errors happened.

After Close operation, click Refresh button until Release button is active (no ajax there). It may take up to 3 minutes. When Release button becomes enabled, click it.

That's all, the archive is promoted to Maven Central and available to use at projects as a dependency. A new version should appear at search for up to 2 hours.

Clone this wiki locally