我使用下面的代码显然根据产品口味自动生成pro guard映射文件.
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"
}
}
}
}
}
}
}
将android studio升级到3.0后,它会显示一条警告,提示isMinifyEnabled()已弃用,我无法找到任何解决方案或替代此isMinifyEnabled().有任何帮助提前感谢吗?