This page is obsolete. Redirecting to https://developer.android.com/studio/build/shrink-code.html#gradle-shrinker android { buildTypes { debug { minifyEnabled true useProguard false proguardFiles getDefaultProguardFile('proguard-android.txt') } } } The built-in shrinker can only remove dead code, it does not obfuscate or optimize. It can be configured using the same files as ProGuard, but will ignore all flags related to obfuscation or optimization. Unlike ProGuard, we support using the built-in shrinker together with Instant Run: depending on the project, it may significantly decrease the initial build and install time. Any methods that become reachable after a code change will appear as newly added to the program and prevent an Instant Run hotswap. |
Technical docs > New Build System >