proguard-android.txt-8.0.0 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  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. -dontusemixedcaseclassnames
  17. -dontskipnonpubliclibraryclasses
  18. -verbose
  19. # Preserve some attributes that may be required for reflection.
  20. -keepattributes AnnotationDefault,
  21. EnclosingMethod,
  22. InnerClasses,
  23. RuntimeVisibleAnnotations,
  24. RuntimeVisibleParameterAnnotations,
  25. RuntimeVisibleTypeAnnotations,
  26. Signature
  27. -keep public class com.google.vending.licensing.ILicensingService
  28. -keep public class com.android.vending.licensing.ILicensingService
  29. -keep public class com.google.android.vending.licensing.ILicensingService
  30. -dontnote com.android.vending.licensing.ILicensingService
  31. -dontnote com.google.vending.licensing.ILicensingService
  32. -dontnote com.google.android.vending.licensing.ILicensingService
  33. # For native methods, see http://proguard.sourceforge.net/manual/examples.html#native
  34. -keepclasseswithmembernames,includedescriptorclasses class * {
  35. native <methods>;
  36. }
  37. # Keep setters in Views so that animations can still work.
  38. -keepclassmembers public class * extends android.view.View {
  39. void set*(***);
  40. *** get*();
  41. }
  42. # We want to keep methods in Activity that could be used in the XML attribute onClick.
  43. -keepclassmembers class * extends android.app.Activity {
  44. public void *(android.view.View);
  45. }
  46. # For enumeration classes, see http://proguard.sourceforge.net/manual/examples.html#enumerations
  47. -keepclassmembers enum * {
  48. public static **[] values();
  49. public static ** valueOf(java.lang.String);
  50. }
  51. -keepclassmembers class * implements android.os.Parcelable {
  52. public static final ** CREATOR;
  53. }
  54. # Preserve annotated Javascript interface methods.
  55. -keepclassmembers class * {
  56. @android.webkit.JavascriptInterface <methods>;
  57. }
  58. # The support libraries contains references to newer platform versions.
  59. # Don't warn about those in case this app is linking against an older
  60. # platform version. We know about them, and they are safe.
  61. -dontnote android.support.**
  62. -dontnote androidx.**
  63. -dontwarn android.support.**
  64. -dontwarn androidx.**
  65. # This class is deprecated, but remains for backward compatibility.
  66. -dontwarn android.util.FloatMath
  67. # Understand the @Keep support annotation.
  68. -keep class android.support.annotation.Keep
  69. -keep class androidx.annotation.Keep
  70. -keep @android.support.annotation.Keep class * {*;}
  71. -keep @androidx.annotation.Keep class * {*;}
  72. -keepclasseswithmembers class * {
  73. @android.support.annotation.Keep <methods>;
  74. }
  75. -keepclasseswithmembers class * {
  76. @androidx.annotation.Keep <methods>;
  77. }
  78. -keepclasseswithmembers class * {
  79. @android.support.annotation.Keep <fields>;
  80. }
  81. -keepclasseswithmembers class * {
  82. @androidx.annotation.Keep <fields>;
  83. }
  84. -keepclasseswithmembers class * {
  85. @android.support.annotation.Keep <init>(...);
  86. }
  87. -keepclasseswithmembers class * {
  88. @androidx.annotation.Keep <init>(...);
  89. }
  90. # These classes are duplicated between android.jar and org.apache.http.legacy.jar.
  91. -dontnote org.apache.http.**
  92. -dontnote android.net.http.**
  93. # These classes are duplicated between android.jar and core-lambda-stubs.jar.
  94. -dontnote java.lang.invoke.**