Skip to content

Commit

Permalink
Shrink output apk size.
Browse files Browse the repository at this point in the history
This does reduce it by about 30% . (27M -> 17M)

It could be more effective if there was a way to enable stronger zip compression.
But I haven't been able to find a way to do so yet.

For now maybe distribute the apk gzipped (apk.gz) to improve compression.
This reduces size by about another 50 % (output ~ 8.7M)
  • Loading branch information
nain-F49FF806 committed Apr 10, 2024
1 parent bbbdd50 commit d271b43
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion android/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ android {

buildTypes {
release {
isMinifyEnabled = false
isMinifyEnabled = true
isShrinkResources = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
Expand Down
4 changes: 3 additions & 1 deletion android/app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
#-renamesourcefileattribute SourceFile

-dontwarn org.gradle.api.Plugin

0 comments on commit d271b43

Please sign in to comment.