proguard-android.txt-8.10.1 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. # Optimization is turned off by default. Dex does not like code run
  8. # through the ProGuard optimize steps (and performs some
  9. # of these optimizations on its own).
  10. # Note that if you want to enable optimization, you cannot just
  11. # include optimization flags in your own project configuration file;
  12. # instead you will need to point to the
  13. # "proguard-android-optimize.txt" file instead of this one from your
  14. # project.properties file.
  15. -dontoptimize
  16. # Preserve some attributes that may be required for reflection.
  17. -keepattributes AnnotationDefault,
  18. EnclosingMethod,
  19. InnerClasses,
  20. RuntimeVisibleAnnotations,
  21. RuntimeVisibleParameterAnnotations,
  22. RuntimeVisibleTypeAnnotations,
  23. Signature
  24. -keep public class com.google.vending.licensing.ILicensingService
  25. -keep public class com.android.vending.licensing.ILicensingService
  26. -keep public class com.google.android.vending.licensing.ILicensingService
  27. -dontnote com.android.vending.licensing.ILicensingService
  28. -dontnote com.google.vending.licensing.ILicensingService
  29. -dontnote com.google.android.vending.licensing.ILicensingService
  30. # For native methods, see https://www.guardsquare.com/manual/configuration/examples#native
  31. -keepclasseswithmembernames,includedescriptorclasses class * {
  32. native <methods>;
  33. }
  34. # Keep setters in Views so that animations can still work.
  35. -keepclassmembers public class * extends android.view.View {
  36. void set*(***);
  37. *** get*();
  38. }
  39. # We want to keep methods in Activity that could be used in the XML attribute onClick.
  40. -keepclassmembers class * extends android.app.Activity {
  41. public void *(android.view.View);
  42. }
  43. # For enumeration classes, see https://www.guardsquare.com/manual/configuration/examples#enumerations
  44. -keepclassmembers enum * {
  45. public static **[] values();
  46. public static ** valueOf(java.lang.String);
  47. }
  48. -keepclassmembers class * implements android.os.Parcelable {
  49. public static final ** CREATOR;
  50. }
  51. # Preserve annotated Javascript interface methods.
  52. -keepclassmembers class * {
  53. @android.webkit.JavascriptInterface <methods>;
  54. }
  55. # The support libraries contains references to newer platform versions.
  56. # Don't warn about those in case this app is linking against an older
  57. # platform version. We know about them, and they are safe.
  58. -dontnote android.support.**
  59. -dontnote androidx.**
  60. -dontwarn android.support.**
  61. -dontwarn androidx.**
  62. # Understand the @Keep support annotation.
  63. -keep class android.support.annotation.Keep
  64. -keep @android.support.annotation.Keep class * {*;}
  65. -keepclasseswithmembers class * {
  66. @android.support.annotation.Keep <methods>;
  67. }
  68. -keepclasseswithmembers class * {
  69. @android.support.annotation.Keep <fields>;
  70. }
  71. -keepclasseswithmembers class * {
  72. @android.support.annotation.Keep <init>(...);
  73. }
  74. # These classes are duplicated between android.jar and org.apache.http.legacy.jar.
  75. -dontnote org.apache.http.**
  76. -dontnote android.net.http.**
  77. # These classes are duplicated between android.jar and core-lambda-stubs.jar.
  78. -dontnote java.lang.invoke.**