android tutorial - Shrink the code with ProGuard - android studio - android app developement
Shrink the code with proguard in android
To enable code shrinking with ProGuard, add minifyEnabled true to the appropriate build type in your build.gradle file.
where: minifyEnabled true : enable code shrinking The getDefaultProguardFile(‘proguard-android.txt') method gets the default ProGuard settings from the Android SDK The proguard-rules.pro file is where you can add custom ProGuard rules