To just compress the application, you have to do the following:
release { proguardFile getDefaultProguardFile('proguard-android.txt') proguardFile 'proguard-shrink-only.txt' proguardFile 'proguard-project.txt' }
proguard-shrink-only.txt should contain the following parameters:
-dontobfuscate -dontoptimize
proguard-project.txt should contain your project-specific rules, which may be required for classes that are used in reflection.
source share