proguard-android.txt-4.1.3 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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,includedescriptorclasses 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. # Preserve annotated Javascript interface methods.
  49. -keepclassmembers class * {
  50. @android.webkit.JavascriptInterface <methods>;
  51. }
  52. # The support libraries contains references to newer platform versions.
  53. # Don't warn about those in case this app is linking against an older
  54. # platform version. We know about them, and they are safe.
  55. -dontnote android.support.**
  56. -dontnote androidx.**
  57. -dontwarn android.support.**
  58. -dontwarn androidx.**
  59. # This class is deprecated, but remains for backward compatibility.
  60. -dontwarn android.util.FloatMath
  61. # Understand the @Keep support annotation.
  62. -keep class android.support.annotation.Keep
  63. -keep class androidx.annotation.Keep
  64. -keep @android.support.annotation.Keep class * {*;}
  65. -keep @androidx.annotation.Keep class * {*;}
  66. -keepclasseswithmembers class * {
  67. @android.support.annotation.Keep <methods>;
  68. }
  69. -keepclasseswithmembers class * {
  70. @androidx.annotation.Keep <methods>;
  71. }
  72. -keepclasseswithmembers class * {
  73. @android.support.annotation.Keep <fields>;
  74. }
  75. -keepclasseswithmembers class * {
  76. @androidx.annotation.Keep <fields>;
  77. }
  78. -keepclasseswithmembers class * {
  79. @android.support.annotation.Keep <init>(...);
  80. }
  81. -keepclasseswithmembers class * {
  82. @androidx.annotation.Keep <init>(...);
  83. }
  84. # These classes are duplicated between android.jar and org.apache.http.legacy.jar.
  85. -dontnote org.apache.http.**
  86. -dontnote android.net.http.**
  87. # These classes are duplicated between android.jar and core-lambda-stubs.jar.
  88. -dontnote java.lang.invoke.**