My gradle config is :
minifyEnabled true
shrinkResources true
proguardFile 'proguard-rules.pro'
I want to minify my app's size. Thus I use proguard to achive this. However, I don`t want to change my class names and method names. Therefore, I try to turn off all Android ProGuard features except obfuscation.
And my proguard-rules.pro is as follows:
-dontshrink
-dontusemixedcaseclassnames
-dontpreverify
-optimizations !code/simplification/arithmetic,!code/simplification/cast,!field/*,!class/merging/*
-optimizationpasses 5
However, -dontshrink seems has no effect. Thus, I -keep many classes and -donwarn them as well.
But there still problems, such as :
Error:Execution failed for task ':app:proguardDefaultConfigDebug'.
Can't find common super class of [org/luaj/vm2/script/LuaScriptEngine$LuajCompiledScript] (with 1 known super classes) and [java/lang/Object] (with 1 known super classes)
and :
warning: a.a.a.a.a can't find referenced calss org.apache.thrift.TEnum