From a12aba7e1c190df38f76bb228e77d1fd10c3c1d5 Mon Sep 17 00:00:00 2001 From: Erdem Yerebasmaz Date: Fri, 28 Jun 2024 15:28:11 +0300 Subject: [PATCH] Minify & shrink resources for release build --- android/app/build.gradle | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/android/app/build.gradle b/android/app/build.gradle index 232cbfa7..812a1656 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -96,11 +96,23 @@ android { buildTypes { debug { signingConfig = signingConfigs.debug + minifyEnabled = false + shrinkResources = false applicationIdSuffix = ".debug" versionNameSuffix = "-DEBUG" } release { signingConfig = signingConfigs.release + // Enables code shrinking, obfuscation, and optimization for only + // your project's release build type. Make sure to use a build + // variant with `debuggable false`. + minifyEnabled = true + + // Enables resource shrinking, which is performed by the + // Android Gradle plugin. + shrinkResources = true + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), + 'proguard-rules.pro' } } }