mirror of
https://github.com/aljazceru/breez-sdk-liquid.git
synced 2025-12-29 03:44:27 +01:00
36 lines
669 B
Bash
Executable File
36 lines
669 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Setup
|
|
BUILD_DIR=platform-build
|
|
mkdir $BUILD_DIR
|
|
cd $BUILD_DIR
|
|
|
|
# Create the jniLibs build directory
|
|
JNI_DIR=jniLibs
|
|
mkdir -p $JNI_DIR
|
|
|
|
# Set up cargo-ndk
|
|
cargo install cargo-ndk
|
|
rustup target add \
|
|
aarch64-linux-android \
|
|
armv7-linux-androideabi \
|
|
x86_64-linux-android \
|
|
i686-linux-android
|
|
|
|
# Build the android libraries in the jniLibs directory
|
|
cargo ndk -o $JNI_DIR \
|
|
--manifest-path ../../../Cargo.toml \
|
|
-t armeabi-v7a \
|
|
-t arm64-v8a \
|
|
-t x86 \
|
|
-t x86_64 \
|
|
build "$@"
|
|
|
|
# Archive the dynamic libs
|
|
cd $JNI_DIR
|
|
tar -czvf ../android.tar.gz *
|
|
cd -
|
|
|
|
# Cleanup
|
|
rm -rf $JNI_DIR
|