android tutorial - Enable Proguard using gradle in Android | Developer android - android app development - android studio - android app developement
Enable Proguard using gradle
- For enabling Proguard configurations for your application you need to enable it in your module-level gradle file. You need to set the value of minifyEnabled to true.
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
click below button to copy code from our android learning website - android tutorial - team
The above code will apply your Proguard configurations contained in the default Android SDK combined with the "proguard-rules.pro" file on your module to your released apk.