2.3 KiB
2.3 KiB
Publishing
Two types of artifacts can be published:
- Snapshot — An unstable release of the SDK for testing
- Release — A stable release of the SDK
Control of these modes of release is managed with a Gradle property IS_SNAPSHOT
, which is
For both snapshot and release deployments, there are two ways to initiate deployment:
- Automatically — See ci.md, which describes the continuous integration workflow for deployment.
- Manually — See the remainder of this document for how to configure manual deployment.
Publishing requires:
One time only
- Set up environment to compile the SDK
- Copy the GPG key to a directory with proper permissions (chmod 600). Note: If you'd like to quickly publish locally without subsequently publishing to Maven Central, configure a Gradle property
RELEASE_SIGNING_ENABLED=false
- Create file
~/.gradle/gradle.properties
per the instructions in this guide- add your sonotype credentials with these properties
mavenCentralUsername
mavenCentralPassword
- point it to the GPG key with these properties
signing.keyId
signing.password
signing.secretKeyRingFile
- add your sonotype credentials with these properties
Every time
- Update the build number and the CHANGELOG. For release builds, suffix the Gradle invocations below with
-PIS_SNAPSHOT=false
. - Build locally
- This will install the files in your local maven repo at
~/.m2/repository/cash/z/ecc/android/
- This will install the files in your local maven repo at
./gradlew publishToMavenLocal
- Publish via the following command:
# This uploads the file to sonotype’s staging area
./gradlew publish --no-daemon --no-parallel
- Deploy to maven central:
# This closes the staging repository and releases it to the world
./gradlew closeAndReleaseRepository
Note: Our existing artifacts can be found here and here: https://search.maven.org/artifact/cash.z.ecc.android/zcash-android-sdk https://repo1.maven.org/maven2/cash/z/ecc/android/