-
Notifications
You must be signed in to change notification settings - Fork 5
Building library for Android
Ivan Schütz edited this page Jun 25, 2020
·
20 revisions
-
Clone this repo
-
Install rustup
-
Make sure you've the Android NDK installed, and that the
NDK_HOME
environment variable points to it. E.g:
echo $NDK_HOME
/Users/foo/Library/Android/sdk/ndk/21.3.6528147/
- Install cargo ndk:
cargo install cargo-ndk
- Add toolchains:
rustup target add aarch64-linux-android armv7-linux-androideabi x86_64-linux-android i686-linux-android
The list of targets above is not necessarily up to date. See e.g. here for current targets. Use rustup target list
to see a list of currently supported targets.
-
Set Android path environmental variable to your local repo using: 'export PATH_TO_ANDROID_REPO=<your_path_here>'"
-
Run the script, which will build the libraries and copy them to the Android local copy:
sh ./scripts/android/create_android.sh
- To build and copy a release version pass the --release flag to the script:
sh ./scripts/android/create_android.sh --release
- Run the Core Android app's Unit and instrumentation tests. Ensure everything is green!
- Zip the created
jniLibs
folder in core > src > main. - Create a new Release in Github and attach the zip as binary.
NOTE: You have to attach the iOS binaries as well. Instructions here.