proguard-android-optimize.txt-8.10.1 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. # This is a configuration file for ProGuard.
  2. # http://proguard.sourceforge.net/index.html#manual/usage.html
  3. #
  4. # Starting with version 2.2 of the Android plugin for Gradle, this file is distributed together with
  5. # the plugin and unpacked at build-time. The files in $ANDROID_HOME are no longer maintained and
  6. # will be ignored by new version of the Android plugin for Gradle.
  7. # Optimizations: If you don't want to optimize, use the proguard-android.txt configuration file
  8. # instead of this one, which turns off the optimization flags.
  9. -allowaccessmodification
  10. # Preserve some attributes that may be required for reflection.
  11. -keepattributes AnnotationDefault,
  12. EnclosingMethod,
  13. InnerClasses,
  14. RuntimeVisibleAnnotations,
  15. RuntimeVisibleParameterAnnotations,
  16. RuntimeVisibleTypeAnnotations,
  17. Signature
  18. -keep public class com.google.vending.licensing.ILicensingService
  19. -keep public class com.android.vending.licensing.ILicensingService
  20. -keep public class com.google.android.vending.licensing.ILicensingService
  21. -dontnote com.android.vending.licensing.ILicensingService
  22. -dontnote com.google.vending.licensing.ILicensingService
  23. -dontnote com.google.android.vending.licensing.ILicensingService
  24. # For native methods, see https://www.guardsquare.com/manual/configuration/examples#native
  25. -keepclasseswithmembernames,includedescriptorclasses class * {
  26. native <methods>;
  27. }
  28. # Keep setters in Views so that animations can still work.
  29. -keepclassmembers public class * extends android.view.View {
  30. void set*(***);
  31. *** get*();
  32. }
  33. # We want to keep methods in Activity that could be used in the XML attribute onClick.
  34. -keepclassmembers class * extends android.app.Activity {
  35. public void *(android.view.View);
  36. }
  37. # For enumeration classes, see https://www.guardsquare.com/manual/configuration/examples#enumerations
  38. -keepclassmembers enum * {
  39. public static **[] values();
  40. public static ** valueOf(java.lang.String);
  41. }
  42. -keepclassmembers class * implements android.os.Parcelable {
  43. public static final ** CREATOR;
  44. }
  45. # Preserve annotated Javascript interface methods.
  46. -keepclassmembers class * {
  47. @android.webkit.JavascriptInterface <methods>;
  48. }
  49. # The support libraries contains references to newer platform versions.
  50. # Don't warn about those in case this app is linking against an older
  51. # platform version. We know about them, and they are safe.
  52. -dontnote android.support.**
  53. -dontnote androidx.**
  54. -dontwarn android.support.**
  55. -dontwarn androidx.**
  56. # Understand the @Keep support annotation.
  57. -keep class android.support.annotation.Keep
  58. -keep @android.support.annotation.Keep class * {*;}
  59. -keepclasseswithmembers class * {
  60. @android.support.annotation.Keep <methods>;
  61. }
  62. -keepclasseswithmembers class * {
  63. @android.support.annotation.Keep <fields>;
  64. }
  65. -keepclasseswithmembers class * {
  66. @android.support.annotation.Keep <init>(...);
  67. }
  68. # These classes are duplicated between android.jar and org.apache.http.legacy.jar.
  69. -dontnote org.apache.http.**
  70. -dontnote android.net.http.**
  71. # These classes are duplicated between android.jar and core-lambda-stubs.jar.
  72. -dontnote java.lang.invoke.**