I play with ProGuard in my current project and decided to try the optimized Android configuration (with gradle):
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
I did not find clear documentation on the optimization performed by the versions of proguard and android that are compatible with them:
-optimizations !code/simplification/arithmetic,!code/simplification/cast,!field/*,!class/merging/*
Are they relevant if the app min sdk version is 11?
So, I decided to redefine it to try in proguard-rules.pro :
-optimizations ** -printconfiguration "result.pro"
But the final configuration is not what I expected. It contains all the combined rules:
-optimizations !code/simplification/arithmetic,!code/simplification/cast,!field/*,!class/merging/*,**
So, how can you correctly override an option in ProGuard? Or maybe this line is equal to -optimizations ** ?
source share