Let R8 optimize the release dex, not just shrink it

This commit is contained in:
2026-09-16 18:54:49 +07:00
parent 13ad52a975
commit c469d9be81
+4 -1
View File
@@ -148,7 +148,10 @@ android {
def enableShrinkResources = findProperty('android.enableShrinkResourcesInReleaseBuilds') ?: 'false'
shrinkResources enableShrinkResources.toBoolean()
minifyEnabled enableMinifyInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
// ponytail: proguard-android.txt carries -dontoptimize, which is what
// Play flags as unoptimized code. The -optimize file drops it; R8's
// optimizer + keep rules from the RN/Expo AARs carry the rest.
proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
def enablePngCrunchInRelease = findProperty('android.enablePngCrunchInReleaseBuilds') ?: 'true'
crunchPngs enablePngCrunchInRelease.toBoolean()
}