From 150a0de1c4b5a4b35fbbce248e005f0dd0223cba Mon Sep 17 00:00:00 2001 From: ardocrat Date: Sat, 14 Sep 2024 21:17:43 +0300 Subject: [PATCH] android: always build with release-apk profile --- scripts/android.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/android.sh b/scripts/android.sh index caed848..4446447 100755 --- a/scripts/android.sh +++ b/scripts/android.sh @@ -33,7 +33,6 @@ cargo install cargo-ndk success=1 ### Build native code -[[ $1 == "release" ]] && release_param="--profile release-apk" function build_lib() { [[ $1 == "v7" ]] && arch=(armeabi-v7a) [[ $1 == "v8" ]] && arch=(arm64-v8a) @@ -43,9 +42,9 @@ function build_lib() { # Fix for https://stackoverflow.com/questions/57193895/error-use-of-undeclared-identifier-pthread-mutex-robust-cargo-build-liblmdb-s export CPPFLAGS="-DMDB_USE_ROBUST=0" && export CFLAGS="-DMDB_USE_ROBUST=0" - cargo ndk -t ${arch} build ${release_param} + cargo ndk -t ${arch} build --profile release-apk unset CPPFLAGS && unset CFLAGS - cargo ndk -t ${arch} -o android/app/src/main/jniLibs build ${release_param} + cargo ndk -t ${arch} -o android/app/src/main/jniLibs build --profile release-apk if [ $? -eq 0 ] then success=1