feat: enable code optimization and resource shrinking in release build

This commit is contained in:
2026-02-27 19:34:08 +01:00
parent d02e39b674
commit 96a9419746
4 changed files with 19 additions and 15 deletions

View File

@@ -25,7 +25,11 @@ android {
buildTypes { buildTypes {
release { release {
isMinifyEnabled = false // Enables code-related app optimization.
isMinifyEnabled = true
// Enables resource shrinking.
isShrinkResources = true
proguardFiles( proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro" getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
) )

View File

@@ -12,10 +12,8 @@
# public *; # public *;
#} #}
# Uncomment this to preserve the line number information for # Preserve the line number information for debugging stack traces.
# debugging stack traces. -keepattributes SourceFile,LineNumberTable
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to # Hide the original source file name.
# hide the original source file name. -renamesourcefileattribute SourceFile
#-renamesourcefileattribute SourceFile

View File

@@ -17,14 +17,18 @@ android {
applicationId = "hu.bbara.purefin" applicationId = "hu.bbara.purefin"
minSdk = 29 minSdk = 29
targetSdk = 36 targetSdk = 36
versionCode = 1000001 versionCode = 1000002
versionName = "0.1" versionName = "0.1"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
} }
buildTypes { buildTypes {
release { release {
isMinifyEnabled = false // Enables code-related app optimization.
isMinifyEnabled = true
// Enables resource shrinking.
isShrinkResources = true
proguardFiles( proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro" getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
) )

View File

@@ -12,10 +12,8 @@
# public *; # public *;
#} #}
# Uncomment this to preserve the line number information for # Preserve the line number information for debugging stack traces.
# debugging stack traces. -keepattributes SourceFile,LineNumberTable
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to # Hide the original source file name.
# hide the original source file name. -renamesourcefileattribute SourceFile
#-renamesourcefileattribute SourceFile