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 {
release {
isMinifyEnabled = false
// Enables code-related app optimization.
isMinifyEnabled = true
// Enables resource shrinking.
isShrinkResources = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
)

View File

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

View File

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

View File

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