R8 includes a set of additional optimizations that are not enabled by default. You can enable these additional optimizations by including the following in your project’s gradle.properties file:
android.enableR8.fullMode=true
and use these bellow code to shrink all of your resources and minify them:
buildTypes {
debug {
shrinkResources true
minifyEnabled true
useProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
release {
shrinkResources true
minifyEnabled true
useProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
0 Comments