From 10bd1ca05419e5a6f781f6c756b83660cea2d1a1 Mon Sep 17 00:00:00 2001 From: James Brunskill Date: Wed, 4 Dec 2024 16:05:29 +1300 Subject: [PATCH] Reduce apk size --- .../android/app/src/main/jniLibs/armeabi-v7a/.gitignore | 2 -- client/packages/android/build_remote_server_libs.sh | 3 +-- package.json | 2 +- server/android/.cargo/config.toml | 7 ++++--- 4 files changed, 6 insertions(+), 8 deletions(-) delete mode 100644 client/packages/android/app/src/main/jniLibs/armeabi-v7a/.gitignore diff --git a/client/packages/android/app/src/main/jniLibs/armeabi-v7a/.gitignore b/client/packages/android/app/src/main/jniLibs/armeabi-v7a/.gitignore deleted file mode 100644 index c96a04f008..0000000000 --- a/client/packages/android/app/src/main/jniLibs/armeabi-v7a/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore \ No newline at end of file diff --git a/client/packages/android/build_remote_server_libs.sh b/client/packages/android/build_remote_server_libs.sh index aad5855547..599d6a46a6 100755 --- a/client/packages/android/build_remote_server_libs.sh +++ b/client/packages/android/build_remote_server_libs.sh @@ -7,7 +7,7 @@ set -e export AR=${NDK_BIN}/llvm-ar export CC_armv7_linux_androideabi=${NDK_BIN}/armv7a-linux-androideabi22-clang -# Build arm64-v8a:aarch64-linux-android and armeabi-v7a:armv7-linux-androideabi +# Build arm64-v8a:aarch64-linux-android (Defined in cargo.toml) PATH=PATH=$PATH:$NDK_BIN \ cargo build \ --release \ @@ -17,4 +17,3 @@ PATH=PATH=$PATH:$NDK_BIN \ # Copy built .so files to jniLib cp "server-lib/aarch64-linux-android/release/libremote_server_android.so" "app/src/main/jniLibs/arm64-v8a/" -cp "server-lib/armv7-linux-androideabi/release/libremote_server_android.so" "app/src/main/jniLibs/armeabi-v7a/" \ No newline at end of file diff --git a/package.json b/package.json index 2d83cf5cdd..c08dcc7996 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "open-msupply", "//": "Main version for the app, should be in semantic version format (any release candidate or test build should be separated by '-' i.e. 1.1.1-rc1 or 1.1.1-test", - "version": "2.3.03", + "version": "2.3.04", "private": true, "scripts": { "start": "cd ./server && cargo run & cd ./client && yarn start-local", diff --git a/server/android/.cargo/config.toml b/server/android/.cargo/config.toml index 942a65461a..4f56c4e03b 100644 --- a/server/android/.cargo/config.toml +++ b/server/android/.cargo/config.toml @@ -6,9 +6,10 @@ # PATH=$PATH:$NDK_BIN cargo build --target aarch64-linux-android --release [build] -target = ["aarch64-linux-android", "armv7-linux-androideabi"] +target = ["aarch64-linux-android"] [target.aarch64-linux-android] linker = "aarch64-linux-android22-clang" -[target.armv7-linux-androideabi] -linker = "armv7a-linux-androideabi22-clang" \ No newline at end of file + +[profile.release] +opt-level = "s" \ No newline at end of file