-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathandroid_bindings.sh
More file actions
executable file
·25 lines (20 loc) · 1.09 KB
/
Copy pathandroid_bindings.sh
File metadata and controls
executable file
·25 lines (20 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh
set -x
export LIBRARY_NAME=libcodekit_core
export JNILIBS_DIR=../bindings/${LIBRARY_NAME}/android/jniLibs
cd codekit-core
# Arm 64
cargo build --lib --release -p codekit-core --features jni-interface --target aarch64-linux-android
cp ./target/aarch64-linux-android/debug/${LIBRARY_NAME}.so ${JNILIBS_DIR}/arm64-v8a/${LIBRARY_NAME}.so
# Armv7
cargo build --lib --release -p codekit-core --features jni-interface --target armv7-linux-androideabi
cp ./target/armv7-linux-androideabi/debug/${LIBRARY_NAME}.so ${JNILIBS_DIR}/armeabi-v7a/${LIBRARY_NAME}.so
# # x86
cargo build --lib --release -p codekit-core --features jni-interface --target i686-linux-android
cp ./target/i686-linux-android/debug/${LIBRARY_NAME}.so ${JNILIBS_DIR}/x86/${LIBRARY_NAME}.so
# x86_64
cargo build --lib --release -p codekit-core --features jni-interface --target x86_64-linux-android
cp ./target/x86_64-linux-android/debug/${LIBRARY_NAME}.so ${JNILIBS_DIR}/x86_64/${LIBRARY_NAME}.so
## Copy libraries to android
cd ..
cp -R bindings/${LIBRARY_NAME}/android/jniLibs/ bindings/CodeKitAndroid/app/codekit/src/main/jniLibs