Select to view content in your preferred language

ProGuard Configuration

1316
3
03-26-2014 11:55 AM
PatrickO_Brien2
New Contributor
Does anyone know of a recommended ProGuard configuration for the Android runtime jars?  We are trying to reduce the size of the jars optimize our packages.  Have been successfully able to shrink numerous other api's as they publish recommended settings.  Curious if there is a known or published ProGuard configuration for the 10.2 api?

http://developer.android.com/tools/help/proguard.html

Thanks,
Patrick
0 Kudos
3 Replies
FelixHoule
New Contributor
-keep class com.esri.** { *; }

works for me
0 Kudos
ShellyGill1
Esri Contributor
Hi Patrick,

The Android API jars have already been optimised with Proguard during production, so we do not recommend any further optimisation. Esri uses Proguard for obfuscation purposes but we have deliberately not applied optimisation to this process, due to the concern that this can lead to bugs that are hard to solve. More information can be found here:
http://tools.android.com/recent/proguardimprovements
"Dalvik performs many of its own optimizations, and some of the optimizations performed by ProGuard are incompatible with Dalvik, so to avoid hard-to-figure-out bugs (and because the net performance gain is usually small), the default configuration turns off optimization."

Hope this info is somewhat useful, perhaps you can post back with more info on the size limits you are trying to hit?

Regards
Shelly
0 Kudos
PatrickO_Brien2
New Contributor
Thanks for the reply Shelly,
Glad to hear the API has already been optimized.  Our primary goal and the reason for the inquiry is that we are looking to shrink the method count for our deployable.

Thanks,
Patrick
0 Kudos