proguard 1.7 KB

12345678910111213141516171819202122232425262728293031
  1. # Gson: https://github.com/google/gson/blob/master/examples/android-proguard-example/proguard.cfg
  2. -keepattributes Signature
  3. -keepattributes *Annotation*
  4. -dontwarn sun.misc.**
  5. -keep class org.sirekanyan.knigopis.model.** { <fields>; }
  6. -keep class * extends com.google.gson.TypeAdapter
  7. -keep class * implements com.google.gson.TypeAdapterFactory
  8. -keep class * implements com.google.gson.JsonSerializer
  9. -keep class * implements com.google.gson.JsonDeserializer
  10. -keepclassmembers,allowobfuscation class * { @com.google.gson.annotations.SerializedName <fields>; }
  11. -keep,allowobfuscation,allowshrinking class com.google.gson.reflect.TypeToken
  12. -keep,allowobfuscation,allowshrinking class * extends com.google.gson.reflect.TypeToken
  13. # Retrofit: https://github.com/square/retrofit/blob/master/retrofit/src/main/resources/META-INF/proguard/retrofit2.pro
  14. -keepattributes Signature, InnerClasses, EnclosingMethod
  15. -keepattributes RuntimeVisibleAnnotations, RuntimeVisibleParameterAnnotations
  16. -keepattributes AnnotationDefault
  17. -keepclassmembers,allowshrinking,allowobfuscation interface * { @retrofit2.http.* <methods>; }
  18. -dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
  19. -dontwarn javax.annotation.**
  20. -dontwarn kotlin.Unit
  21. -dontwarn retrofit2.KotlinExtensions
  22. -dontwarn retrofit2.KotlinExtensions$*
  23. -if interface * { @retrofit2.http.* <methods>; }
  24. -keep,allowobfuscation interface <1>
  25. -if interface * { @retrofit2.http.* <methods>; }
  26. -keep,allowobfuscation interface * extends <1>
  27. -keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation
  28. -if interface * { @retrofit2.http.* public *** *(...); }
  29. -keep,allowoptimization,allowshrinking,allowobfuscation class <3>
  30. -keep,allowobfuscation,allowshrinking class retrofit2.Response