Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/puyang1017/mvp
Browse files Browse the repository at this point in the history
  • Loading branch information
puyang1017 committed Mar 6, 2020
2 parents 30af51f + 4928465 commit 52f0816
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion puymvpjava/proguard-pro/proguard-retrofit.pro
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,34 @@

-keepclasseswithmembers class * {
@retrofit2.http.* <methods>;
}
}

# Retrofit does reflection on generic parameters. InnerClasses is required to use Signature and
# EnclosingMethod is required to use InnerClasses.
-keepattributes Signature, InnerClasses, EnclosingMethod

# Retrofit does reflection on method and parameter annotations.
-keepattributes RuntimeVisibleAnnotations, RuntimeVisibleParameterAnnotations

# Retain service method parameters when optimizing.
-keepclassmembers,allowshrinking,allowobfuscation interface * {
@retrofit2.http.* <methods>;
}

# Ignore annotation used for build tooling.
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement

# Ignore JSR 305 annotations for embedding nullability information.
-dontwarn javax.annotation.**

# Guarded by a NoClassDefFoundError try/catch and only used when on the classpath.
-dontwarn kotlin.Unit

# Top-level functions that can only be used by Kotlin.
-dontwarn retrofit2.KotlinExtensions
-dontwarn retrofit2.KotlinExtensions$*

# With R8 full mode, it sees no subtypes of Retrofit interfaces since they are created with a Proxy
# and replaces all potential values with null. Explicitly keeping the interfaces prevents this.
-if interface * { @retrofit2.http.* <methods>; }
-keep,allowobfuscation interface <1>

0 comments on commit 52f0816

Please sign in to comment.