This document describes the process for releasing Vanadium Java components to JCenter and Maven Central. The components covered by this document are the
JCenter and Maven Central are two large repositories of Java and other software binaries. Tools such as Maven and Gradle can fetch binaries from these repositories. Many projects use these tools to manage their builds. By providing Vanadium Java and Android libraries through these channels, the Vanadium team is making it easy for developers using these tools to get Vanadium into software projects.
For the purposes of the release process, we consider the Java and Android libraries to be one component. They should be released at the same time. The Gradle plugin can be released separately.
The following one-time steps should be done before making your first release.
Release engineers should have a Bintray account, which will be used to push binaries to JCenter and Maven Central. To create a Bintray account:
The account is now created. You need to be part of the Vanadium Bintray organization. To do this:
A member of the Vanadium organization will approve the request.
You need to create a Sonatype JIRA account. To do this:
To: vanadium-discuss@v.io Subject: Add Maven Central releaser Hi there, I'd like to be added to list of Maven Central releasers. My JIRA username is <your JIRA username> Thanks, New releaser
The steps to release the Gradle plugin are:
$JIRI_ROOT/release/java/gradle-plugin/build.gradle
and change the releaseVersion
variable to the new release numbercd $JIRI_ROOT/release/java/gradle-plugin ./gradlew clean bintrayUpload
This command will build and upload the VDL plugin to Bintray.
The new version is now published to JCenter. For Maven Central, follow these additional steps:
Assuming there were no errors, the new version will be pushed out to Maven Central shortly (usually within a matter of 10 minutes or so). You can verify by visiting the Maven Central page for the plugin. When the new version number appears in the list, the plugin has been published.
Releasing these libraries is similar to releasing the Gradle plugin with one notable exception: it must be performed once on Linux and once on Darwin. This is due to the fact that, at this point in time, the Vanadium Java libraries cannot be cross-compiled between the two platforms.
On either Linux or Darwin, perform the following steps:
$JIRI_ROOT/release/java/lib/build.gradle
and change the releaseVersion
variable to the new release number$JIRI_ROOT/release/java/android-lib/build.gradle
and change the releaseVersion
variable to the same release numbercd $JIRI_ROOT/release/java ./gradlew :lib:clean :lib:bintrayUpload ./gradlew :android-lib:clean :android-lib:bintrayUpload
Now, switch to the other platform (i.e. not the one you used for the above steps) and:
$JIRI_ROOT/release/java/lib/build.gradle
filereleaseVersion
variable to match the same variable from the previous stepspublications = ['mavenJava', 'mavenNoNatives', 'mavenNatives']
mavenJava
and mavenNoNatives
, remove those entries. Do not check in your changes. The line should now readpublications = ['mavenNatives']
cd $JIRI_ROOT/release/java ./gradlew :lib:clean :lib:bintrayUpload
The binaries for the Vanadium and Vanadium Android libraries are now uploaded to Bintray. Time to publish them to JCenter and Maven Central.
The new Vanadium library version is now published to JCenter. For Maven Central, follow these additional steps:
The Vanadium library will now be pushed out to Maven Central in a few minutes. Now go to the Vanadium Android library Bintray page and repeat the publishing steps.