proguard-android-optimize.txt 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. # This is a configuration file for ProGuard.
  2. # http://proguard.sourceforge.net/index.html#manual/usage.html
  3. # Optimizations: If you don't want to optimize, use the
  4. # proguard-android.txt configuration file instead of this one, which
  5. # turns off the optimization flags. Adding optimization introduces
  6. # certain risks, since for example not all optimizations performed by
  7. # ProGuard works on all versions of Dalvik. The following flags turn
  8. # off various optimizations known to have issues, but the list may not
  9. # be complete or up to date. (The "arithmetic" optimization can be
  10. # used if you are only targeting Android 2.0 or later.) Make sure you
  11. # test thoroughly if you go this route.
  12. -optimizations !code/simplification/arithmetic,!code/simplification/cast,!field/*,!class/merging/*
  13. -optimizationpasses 5
  14. -allowaccessmodification
  15. -dontpreverify
  16. # The remainder of this file is identical to the non-optimized version
  17. # of the Proguard configuration file (except that the other file has
  18. # flags to turn off optimization).
  19. -dontusemixedcaseclassnames
  20. -dontskipnonpubliclibraryclasses
  21. -verbose
  22. -keepattributes *Annotation*
  23. -keep public class com.google.vending.licensing.ILicensingService
  24. -keep public class com.android.vending.licensing.ILicensingService
  25. # For native methods, see http://proguard.sourceforge.net/manual/examples.html#native
  26. -keepclasseswithmembernames class * {
  27. native <methods>;
  28. }
  29. # keep setters in Views so that animations can still work.
  30. # see http://proguard.sourceforge.net/manual/examples.html#beans
  31. -keepclassmembers public class * extends android.view.View {
  32. void set*(***);
  33. *** get*();
  34. }
  35. # We want to keep methods in Activity that could be used in the XML attribute onClick
  36. -keepclassmembers class * extends android.app.Activity {
  37. public void *(android.view.View);
  38. }
  39. # For enumeration classes, see http://proguard.sourceforge.net/manual/examples.html#enumerations
  40. -keepclassmembers enum * {
  41. public static **[] values();
  42. public static ** valueOf(java.lang.String);
  43. }
  44. -keep class * implements android.os.Parcelable {
  45. public static final android.os.Parcelable$Creator *;
  46. }
  47. -keepclassmembers class **.R$* {
  48. public static <fields>;
  49. }
  50. # The support library contains references to newer platform versions.
  51. # Don't warn about those in case this app is linking against an older
  52. # platform version. We know about them, and they are safe.
  53. -dontwarn android.support.**