proguard-rules.pro 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. -dontobfuscate
  2. # OkHttp
  3. -keepattributes Signature
  4. -keepattributes *Annotation*
  5. -keep class okhttp3.** { *; }
  6. -keep interface okhttp3.** { *; }
  7. -dontwarn okhttp3.**
  8. -dontwarn okio.**
  9. # Okio
  10. -keep class sun.misc.Unsafe { *; }
  11. -dontwarn java.nio.file.*
  12. -dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
  13. -dontwarn okio.**
  14. # Glide specific rules #
  15. # https://github.com/bumptech/glide
  16. -keep public class * implements com.bumptech.glide.module.GlideModule
  17. -keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
  18. **[] $VALUES;
  19. public *;
  20. }
  21. # RxJava 1.1.0
  22. -dontwarn sun.misc.**
  23. -keepclassmembers class rx.internal.util.unsafe.*ArrayQueue*Field* {
  24. long producerIndex;
  25. long consumerIndex;
  26. }
  27. -keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueProducerNodeRef {
  28. rx.internal.util.atomic.LinkedQueueNode producerNode;
  29. }
  30. -keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueConsumerNodeRef {
  31. rx.internal.util.atomic.LinkedQueueNode consumerNode;
  32. }
  33. # Retrofit 2.X
  34. ## https://square.github.io/retrofit/ ##
  35. -dontwarn retrofit2.**
  36. -keep class retrofit2.** { *; }
  37. -keepattributes Signature
  38. -keepattributes Exceptions
  39. -keepclasseswithmembers class * {
  40. @retrofit2.http.* <methods>;
  41. }
  42. # AppCombat
  43. -keep public class android.support.v7.widget.** { *; }
  44. -keep public class android.support.v7.internal.widget.** { *; }
  45. -keep public class android.support.v7.internal.view.menu.** { *; }
  46. -keep public class * extends android.support.v4.view.ActionProvider {
  47. public <init>(android.content.Context);
  48. }
  49. ## GSON 2.2.4 specific rules ##
  50. # Gson uses generic type information stored in a class file when working with fields. Proguard
  51. # removes such information by default, so configure it to keep all of it.
  52. -keepattributes Signature
  53. # For using GSON @Expose annotation
  54. -keepattributes *Annotation*
  55. -keepattributes EnclosingMethod
  56. # Gson specific classes
  57. -keep class sun.misc.Unsafe { *; }
  58. -keep class com.google.gson.stream.** { *; }
  59. ## ACRA 4.5.0 specific rules ##
  60. # we need line numbers in our stack traces otherwise they are pretty useless
  61. -renamesourcefileattribute SourceFile
  62. -keepattributes SourceFile,LineNumberTable
  63. # ACRA needs "annotations" so add this...
  64. -keepattributes *Annotation*
  65. # keep this class so that logging will show 'ACRA' and not a obfuscated name like 'a'.
  66. # Note: if you are removing log messages elsewhere in this file then this isn't necessary
  67. -keep class org.acra.ACRA {
  68. *;
  69. }
  70. # keep this around for some enums that ACRA needs
  71. -keep class org.acra.ReportingInteractionMode {
  72. *;
  73. }
  74. -keepnames class org.acra.sender.HttpSender$** {
  75. *;
  76. }
  77. -keepnames class org.acra.ReportField {
  78. *;
  79. }
  80. # keep this otherwise it is removed by ProGuard
  81. -keep public class org.acra.ErrorReporter {
  82. public void addCustomData(java.lang.String,java.lang.String);
  83. public void putCustomData(java.lang.String,java.lang.String);
  84. public void removeCustomData(java.lang.String);
  85. }
  86. # keep this otherwise it is removed by ProGuard
  87. -keep public class org.acra.ErrorReporter {
  88. public void handleSilentException(java.lang.Throwable);
  89. }
  90. # Keep the support library
  91. -keep class org.acra.** { *; }
  92. -keep interface org.acra.** { *; }
  93. # SnakeYaml
  94. -keep class org.yaml.snakeyaml.** { public protected private *; }
  95. -keep class org.yaml.snakeyaml.** { public protected private *; }
  96. -dontwarn org.yaml.snakeyaml.**
  97. # Duktape
  98. -keep class com.squareup.duktape.** { *; }