Skip to content

Commit

Permalink
Add more attributes to Retrofit's R8/ProGuard rules
Browse files Browse the repository at this point in the history
Usually these are supplied by things like the defaults from the Android SDK, but if you are not using those then Retrofit will fail. Seems like we should be including a complete set rather than assuming any defaults.
  • Loading branch information
JakeWharton authored Feb 12, 2019
1 parent ac566e1 commit 34b9e68
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions retrofit/src/main/resources/META-INF/proguard/retrofit2.pro
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
# 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>;
Expand Down

0 comments on commit 34b9e68

Please sign in to comment.