1.5 KiB
1.5 KiB
Build
There are a variety of aspects to building the SDK and demo app. Although much of this ends up being tested automatically by the CI server, understanding these step can help when troubleshooting build issues. These test cases provide sanity checks that the build is not broken.
Build
- Run the assemble Gradle task, e.g.
./gradlew assemble
- Verify the build completes successfully
Build tests
- Run the assembleAndroidTest Gradle task, e.g.
./gradlew assembleAndroidTest
- Verify the build completes successfully
Publishing
- Run the task
./gradlew publishToMavenLocal
- Open the
~/.m2
directory and look for the newly published artifact - Verify the coordinate are correct, e.g.
cash/z/ecc/android/zcash-android-sdk
- Verify the version is correct, matching the version set in
gradle.properties
- Verify the file size looks correct—the AAR should be on the order of 9 megabytes, which indicates that the native libraries have been bundled in
Clean builds
To have a clean build, both the local Gradle outputs as well as the Rust outputs need to be deleted. The Rust outputs are stored in the directory sdk-lib/targets
. The clean
task has been modified to delete the folder sdk-lib/targets
if it exists.
- Run the clean Gradle task, e.g.
./gradlew clean
- Run the assemble Gradle task, forcing the Gradle build cache to be ignored, e.g.
./gradlew assemble --rerun-tasks
. Note that--rerun-tasks
also causes the cache under~/.gradle/
to be ignored - Verify that the build completes successfully