I use the below code to automatically generate pro guard mapping file apparently according to product flavors.
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
applicationVariants.all { variant ->
if (variant.getBuildType().isMinifyEnabled()) {
variant.assemble.doLast {
copy {
from variant.mappingFile
into "${rootDir}/proguardTools"
rename { String fileName ->
"mapping-${variant.name}.txt"
}
}
}
}
}
}
}
After upgrading android studio to 3.0 it shows a warning saying isMinifyEnabled()
is Deprecated and I could not find any solution or an alternative for this isMinifyEnabled()
. Any help thanks in advance?