From bcabb6f2dfeefe6367b72012c93b8e22d96a6edd Mon Sep 17 00:00:00 2001 From: Goooler Date: Wed, 29 Jul 2026 17:54:03 +0800 Subject: [PATCH] Migrate minification DSL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://developer.android.com/topic/performance/app-optimization/enable-app-optimization#enable ```diff λ diff configuration-old.txt configuration-new.txt 93,117d92 < # The proguard configuration file for the following section is /Users/goooler/StudioProjects/Tabby/androidApp/proguard-rules.pro < -verbose < -allowaccessmodification < < -keepattributes SourceFile, < LineNumberTable < < -renamesourcefileattribute SourceFile < < -dontobfuscate < < # Remove some Kotlin overhead < -processkotlinnullchecks remove < < < # Hardcode in core/src/main/cpp/main.c.JNI_OnLoad < -keep class kotlin.Unit < -keep interface kotlinx.coroutines.CompletableDeferred < < # https://developer.android.com/reference/kotlin/androidx/compose/runtime/ComposeRuntimeFlags#isLinkBufferComposerEnabled() < -assumevalues public class androidx.compose.runtime.ComposeRuntimeFlags { < static boolean isLinkBufferComposerEnabled return true; < } < < # End of content from /Users/goooler/StudioProjects/Tabby/androidApp/proguard-rules.pro 1320a1296,1320 > # The proguard configuration file for the following section is Local project :androidApp::androidApp (extracted file: /Users/goooler/StudioProjects/Tabby/androidApp/src/main/keepRules/proguard-rules.keep) > -verbose > -allowaccessmodification > > -keepattributes SourceFile, > LineNumberTable > > -renamesourcefileattribute SourceFile > > -dontobfuscate > > # Remove some Kotlin overhead > -processkotlinnullchecks remove > > > # Hardcode in core/src/main/cpp/main.c.JNI_OnLoad > -keep class kotlin.Unit > -keep interface kotlinx.coroutines.CompletableDeferred > > # https://developer.android.com/reference/kotlin/androidx/compose/runtime/ComposeRuntimeFlags#isLinkBufferComposerEnabled() > -assumevalues public class androidx.compose.runtime.ComposeRuntimeFlags { > static boolean isLinkBufferComposerEnabled return true; > } > > # End of content from Local project :androidApp::androidApp (extracted file: /Users/goooler/StudioProjects/Tabby/androidApp/src/main/keepRules/proguard-rules.keep) ``` --- androidApp/build.gradle.kts | 6 +++--- .../main/keepRules/proguard-rules.keep} | 0 2 files changed, 3 insertions(+), 3 deletions(-) rename androidApp/{proguard-rules.pro => src/main/keepRules/proguard-rules.keep} (100%) diff --git a/androidApp/build.gradle.kts b/androidApp/build.gradle.kts index 13bdd4554b..3bb2af0a0f 100644 --- a/androidApp/build.gradle.kts +++ b/androidApp/build.gradle.kts @@ -33,9 +33,9 @@ android { signingConfig = releaseSigning } release { - isMinifyEnabled = true - isShrinkResources = true - proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") + optimization { + enable = true + } } } diff --git a/androidApp/proguard-rules.pro b/androidApp/src/main/keepRules/proguard-rules.keep similarity index 100% rename from androidApp/proguard-rules.pro rename to androidApp/src/main/keepRules/proguard-rules.keep