From 96a94197460063ffaf8a59cc7a421ccfbc5936d9 Mon Sep 17 00:00:00 2001 From: Barnabas Balogh Date: Fri, 27 Feb 2026 19:34:08 +0100 Subject: [PATCH] feat: enable code optimization and resource shrinking in release build --- app-tv/build.gradle.kts | 6 +++++- app-tv/proguard-rules.pro | 10 ++++------ app/build.gradle.kts | 8 ++++++-- app/proguard-rules.pro | 10 ++++------ 4 files changed, 19 insertions(+), 15 deletions(-) diff --git a/app-tv/build.gradle.kts b/app-tv/build.gradle.kts index 3315e73..9ee76a4 100644 --- a/app-tv/build.gradle.kts +++ b/app-tv/build.gradle.kts @@ -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" ) diff --git a/app-tv/proguard-rules.pro b/app-tv/proguard-rules.pro index 481bb43..078257d 100644 --- a/app-tv/proguard-rules.pro +++ b/app-tv/proguard-rules.pro @@ -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 \ No newline at end of file +# Hide the original source file name. +-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/app/build.gradle.kts b/app/build.gradle.kts index f2e84ab..684d360 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -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" ) diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 481bb43..078257d 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -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 \ No newline at end of file +# Hide the original source file name. +-renamesourcefileattribute SourceFile \ No newline at end of file