proguard-rules.pro 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. -dontobfuscate
  2. # Keep extension's common dependencies
  3. -keep,allowoptimization class eu.kanade.tachiyomi.** { public protected *; }
  4. -keep,allowoptimization class kotlin.** { public protected *; }
  5. -keep,allowoptimization class okhttp3.** { public protected *; }
  6. -keep,allowoptimization class rx.** { public protected *; }
  7. -keep,allowoptimization class org.jsoup.** { public protected *; }
  8. -keep,allowoptimization class com.google.gson.** { public protected *; }
  9. -keep,allowoptimization class com.github.salomonbrys.kotson.** { public protected *; }
  10. -keep,allowoptimization class com.squareup.duktape.** { public protected *; }
  11. ##---------------Begin: proguard configuration for RxJava 1.x ----------
  12. -dontwarn sun.misc.**
  13. -keepclassmembers class rx.internal.util.unsafe.*ArrayQueue*Field* {
  14. long producerIndex;
  15. long consumerIndex;
  16. }
  17. -keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueProducerNodeRef {
  18. rx.internal.util.atomic.LinkedQueueNode producerNode;
  19. }
  20. -keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueConsumerNodeRef {
  21. rx.internal.util.atomic.LinkedQueueNode consumerNode;
  22. }
  23. -dontnote rx.internal.util.PlatformDependent
  24. ##---------------End: proguard configuration for RxJava 1.x ----------
  25. ##---------------Begin: proguard configuration for Gson ----------
  26. # Gson uses generic type information stored in a class file when working with fields. Proguard
  27. # removes such information by default, so configure it to keep all of it.
  28. -keepattributes Signature
  29. # For using GSON @Expose annotation
  30. -keepattributes *Annotation*
  31. # Gson specific classes
  32. -dontwarn sun.misc.**
  33. # Prevent proguard from stripping interface information from TypeAdapter, TypeAdapterFactory,
  34. # JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)
  35. -keep class * extends com.google.gson.TypeAdapter
  36. -keep class * implements com.google.gson.TypeAdapterFactory
  37. -keep class * implements com.google.gson.JsonSerializer
  38. -keep class * implements com.google.gson.JsonDeserializer
  39. # Prevent R8 from leaving Data object members always null
  40. -keepclassmembers,allowobfuscation class * {
  41. @com.google.gson.annotations.SerializedName <fields>;
  42. }
  43. ##---------------End: proguard configuration for Gson ----------
  44. ##---------------Begin: proguard configuration for kotlinx.serialization ----------
  45. -keepattributes *Annotation*, InnerClasses
  46. -dontnote kotlinx.serialization.AnnotationsKt # core serialization annotations
  47. # kotlinx-serialization-json specific. Add this if you have java.lang.NoClassDefFoundError kotlinx.serialization.json.JsonObjectSerializer
  48. -keepclassmembers class kotlinx.serialization.json.** {
  49. *** Companion;
  50. }
  51. -keepclasseswithmembers class kotlinx.serialization.json.** {
  52. kotlinx.serialization.KSerializer serializer(...);
  53. }
  54. -keep,includedescriptorclasses class eu.kanade.tachiyomi.**$$serializer { *; }
  55. -keepclassmembers class eu.kanade.tachiyomi.** {
  56. *** Companion;
  57. }
  58. -keepclasseswithmembers class eu.kanade.tachiyomi.** {
  59. kotlinx.serialization.KSerializer serializer(...);
  60. }
  61. -keep class kotlinx.serialization.**
  62. -keepclassmembers class kotlinx.serialization.** {
  63. <methods>;
  64. }
  65. ##---------------End: proguard configuration for kotlinx.serialization ----------