From 88e56a0ec43588ad4520b9833bc66be10b90684a Mon Sep 17 00:00:00 2001 From: Pierre-Yves Nicolas <6371790+pynicolas@users.noreply.github.com> Date: Thu, 5 Jun 2025 10:13:33 +0200 Subject: [PATCH] Reduce APK size by removing x86 and minifying --- app/build.gradle.kts | 6 +++++- app/proguard-rules.pro | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 7b865c1..8568eca 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -20,7 +20,11 @@ android { buildTypes { release { - isMinifyEnabled = false + ndk { + abiFilters += listOf("armeabi-v7a", "arm64-v8a") + } + isMinifyEnabled = true + isShrinkResources = true proguardFiles( getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro" diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 481bb43..4d434a2 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -18,4 +18,7 @@ # If you keep the line number information, uncomment this to # hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file +#-renamesourcefileattribute SourceFile + +-dontwarn com.gemalto.jp2.JP2Decoder +-dontwarn com.gemalto.jp2.JP2Encoder