minifyEnabled true
is just a shortcut for:
postprocessing {
removeUnusedCode true
obfuscate true
optimizeCode true
}
So, if you want to minify without obfuscating, replace minifyEnabled true with:
postprocessing {
removeUnusedCode true
obfuscate false // <--
optimizeCode true
}
Additionally, the compiler will complain if you have shrinkResources true. The equivalent postprocessing field is removeUnusedResources true, i.e:
postprocessing {
removeUnusedCode true
removeUnusedResources true // <--
obfuscate false
optimizeCode true
}
Contrary to other answers, useProguard false does not disable obfuscation; it changes the obfuscation engine from ProGuard to R8.