proguard-android.txt-3.6.1 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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 *Annotation*,Signature,InnerClasses,EnclosingMethod
  21. -keep public class com.google.vending.licensing.ILicensingService
  22. -keep public class com.android.vending.licensing.ILicensingService
  23. -keep public class com.google.android.vending.licensing.ILicensingService
  24. -dontnote com.android.vending.licensing.ILicensingService
  25. -dontnote com.google.vending.licensing.ILicensingService
  26. -dontnote com.google.android.vending.licensing.ILicensingService
  27. # For native methods, see http://proguard.sourceforge.net/manual/examples.html#native
  28. -keepclasseswithmembernames class * {
  29. native <methods>;
  30. }
  31. # Keep setters in Views so that animations can still work.
  32. -keepclassmembers public class * extends android.view.View {
  33. void set*(***);
  34. *** get*();
  35. }
  36. # We want to keep methods in Activity that could be used in the XML attribute onClick.
  37. -keepclassmembers class * extends android.app.Activity {
  38. public void *(android.view.View);
  39. }
  40. # For enumeration classes, see http://proguard.sourceforge.net/manual/examples.html#enumerations
  41. -keepclassmembers enum * {
  42. public static **[] values();
  43. public static ** valueOf(java.lang.String);
  44. }
  45. -keepclassmembers class * implements android.os.Parcelable {
  46. public static final ** CREATOR;
  47. }
  48. -keepclassmembers class **.R$* {
  49. public static <fields>;
  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. # This class is deprecated, but remains for backward compatibility.
  63. -dontwarn android.util.FloatMath
  64. # Understand the @Keep support annotation.
  65. -keep class android.support.annotation.Keep
  66. -keep class androidx.annotation.Keep
  67. -keep @android.support.annotation.Keep class * {*;}
  68. -keep @androidx.annotation.Keep class * {*;}
  69. -keepclasseswithmembers class * {
  70. @android.support.annotation.Keep <methods>;
  71. }
  72. -keepclasseswithmembers class * {
  73. @androidx.annotation.Keep <methods>;
  74. }
  75. -keepclasseswithmembers class * {
  76. @android.support.annotation.Keep <fields>;
  77. }
  78. -keepclasseswithmembers class * {
  79. @androidx.annotation.Keep <fields>;
  80. }
  81. -keepclasseswithmembers class * {
  82. @android.support.annotation.Keep <init>(...);
  83. }
  84. -keepclasseswithmembers class * {
  85. @androidx.annotation.Keep <init>(...);
  86. }
  87. # These classes are duplicated between android.jar and org.apache.http.legacy.jar.
  88. -dontnote org.apache.http.**
  89. -dontnote android.net.http.**
  90. # These classes are duplicated between android.jar and core-lambda-stubs.jar.
  91. -dontnote java.lang.invoke.**