[#291] Fix rust build tasks

This resolves a regression introduced in the implementation of issue #251.
This commit is contained in:
Carter Jernigan 2021-09-30 07:19:48 -04:00
parent fde9257207
commit 4923b5fd12
2 changed files with 30 additions and 0 deletions

23
docs/tests/Build.md Normal file
View File

@ -0,0 +1,23 @@
# 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
1. Run the assemble Gradle task, e.g. `./gradlew assemble`
1. Verify the build completes successfully
# Build tests
1. Run the assembleAndroidTest Gradle task, e.g. `./gradlew assembleAndroidTest`
1. Verify the build completes successfully
# Publishing
1. Run the task `./gradlew publishToMavenLocal`
1. Open the `~/.m2` directory and look for the newly published artifact
1. Verify the coordinate are correct, e.g. `cash/z/ecc/android/zcash-android-sdk`
1. Verify the version is correct, matching the version set in `gradle.properties`
1. 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 `targets`._
1. Run the clean Gradle task, e.g. `./gradlew clean`
1. Delete the folder `targets` in the root of the Git repo, if it exists
1. 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._
1. Verify that the build completes successfully

View File

@ -152,6 +152,13 @@ cargo {
"x86",
"x86_64"
)
apiLevels = mapOf(
"arm" to 16,
"arm64" to 21,
"x86" to 16,
"x86_64" to 21,
)
profile = "release"
prebuiltToolchains = true
}