retrofit2.pro 1.2 KB

1234567891011121314151617181920212223242526272829
  1. # Retrofit does reflection on generic parameters. InnerClasses is required to use Signature and
  2. # EnclosingMethod is required to use InnerClasses.
  3. -keepattributes Signature, InnerClasses, EnclosingMethod
  4. # Retrofit does reflection on method and parameter annotations.
  5. -keepattributes RuntimeVisibleAnnotations, RuntimeVisibleParameterAnnotations
  6. # Retain service method parameters when optimizing.
  7. -keepclassmembers,allowshrinking,allowobfuscation interface * {
  8. @retrofit2.http.* <methods>;
  9. }
  10. # Ignore annotation used for build tooling.
  11. -dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
  12. # Ignore JSR 305 annotations for embedding nullability information.
  13. -dontwarn javax.annotation.**
  14. # Guarded by a NoClassDefFoundError try/catch and only used when on the classpath.
  15. -dontwarn kotlin.Unit
  16. # Top-level functions that can only be used by Kotlin.
  17. -dontwarn retrofit2.KotlinExtensions
  18. -dontwarn retrofit2.KotlinExtensions$*
  19. # With R8 full mode, it sees no subtypes of Retrofit interfaces since they are created with a Proxy
  20. # and replaces all potential values with null. Explicitly keeping the interfaces prevents this.
  21. -if interface * { @retrofit2.http.* <methods>; }
  22. -keep,allowobfuscation interface <1>