From 4d87a360e83a573bc11cf42d39296d5116b73fdd Mon Sep 17 00:00:00 2001 From: Carter Jernigan Date: Sat, 11 Sep 2021 07:29:42 -0400 Subject: [PATCH] Update documentation for mavenLocal publishing --- .run/publishToMavenLocal.run.xml | 30 ++++++++++++++++++++++++++++++ PUBLISHING.md | 10 +++++----- sdk-lib/build.gradle | 1 + 3 files changed, 36 insertions(+), 5 deletions(-) create mode 100644 .run/publishToMavenLocal.run.xml diff --git a/.run/publishToMavenLocal.run.xml b/.run/publishToMavenLocal.run.xml new file mode 100644 index 00000000..23b19ad1 --- /dev/null +++ b/.run/publishToMavenLocal.run.xml @@ -0,0 +1,30 @@ + + + + + + + + true + true + false + + + + \ No newline at end of file diff --git a/PUBLISHING.md b/PUBLISHING.md index 69b9249c..667340bb 100644 --- a/PUBLISHING.md +++ b/PUBLISHING.md @@ -3,18 +3,18 @@ Publishing requires: ### One time only -* Get your dev environment setup to [compile the SDK](https://github.com/zcash/zcash-android-wallet-sdk/tree/6d5cf6eefb3c2f793b66162c513790d86f368e49#compiling-sources) -* copy the GPG key to a directory with proper permissions (chmod 600) +* Get your dev environment setup to [compile the SDK](https://github.com/zcash/zcash-android-wallet-sdk/#compiling-sources) +* copy the GPG key to a directory with proper permissions (chmod 600). Note: If you'd like to quickly 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](https://proandroiddev.com/publishing-a-maven-artifact-3-3-step-by-step-instructions-to-mavencentral-publishing-bd661081645d) * add your sonotype credentials to it * point it to the GPG key ### Every time -1. Update the [build number](https://github.com/zcash/zcash-android-wallet-sdk/blob/6d5cf6eefb3c2f793b66162c513790d86f368e49/config.gradle) and the [CHANGELOG](https://github.com/zcash/zcash-android-wallet-sdk/blob/6d5cf6eefb3c2f793b66162c513790d86f368e49/CHANGELOG.md) -2. Build locally +1. Update the [build number](https://github.com/zcash/zcash-android-wallet-sdk/blob/master/sdk-lib/config.gradle) and the [CHANGELOG](https://github.com/zcash/zcash-android-wallet-sdk/blob/master/CHANGELOG.md) +2. Build locally * Critical Note: Building once does not copy the *.so files and results in an artifact <1MB in size. Building twice fixes that problem and results in an artifact >5MB in size. This is probably a bug in the gradle cargo plugin that we use. - * 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 `~/.m2/repository/cash/z/ecc/android/` * Build twice (first with a clean, then without): ```zsh ./gradlew clean publishToMavenLocal && ./gradlew publishToMavenLocal diff --git a/sdk-lib/build.gradle b/sdk-lib/build.gradle index 32713208..9d557661 100644 --- a/sdk-lib/build.gradle +++ b/sdk-lib/build.gradle @@ -96,6 +96,7 @@ android { baseline file("lint-baseline.xml") } } + mavenPublish { androidVariantToPublish = config.publish.target }