Skip to content
This repository was archived by the owner on Nov 20, 2019. It is now read-only.

Commit f092f00

Browse files
committed
Update proguard-square-retrofit.pro
The proguard file for retrofit is incomplete. It does not support rest service interfaces with callbacks and error handling. This PR adds support for that.
1 parent e2e7cbe commit f092f00

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed
Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,23 @@
1+
# Retrofit 1.X
2+
13
-keep class com.squareup.okhttp.** { *; }
4+
-keep class retrofit.** { *; }
25
-keep interface com.squareup.okhttp.** { *; }
3-
-dontwarn com.squareup.okhttp.**
46

5-
-dontwarn rx.**
6-
-dontwarn retrofit.**
7+
-dontwarn com.squareup.okhttp.**
78
-dontwarn okio.**
8-
-keep class retrofit.** { *; }
9+
-dontwarn retrofit.**
10+
-dontwarn rx.**
11+
912
-keepclasseswithmembers class * {
1013
@retrofit.http.* <methods>;
11-
}
14+
}
15+
16+
# If in your rest service interface you use methods with Callback argument.
17+
-keepattributes Exceptions
18+
19+
# If your rest service methods throw custom exceptions, because you've defined an ErrorHandler.
20+
-keepattributes Signature
21+
22+
# Also you must note that if you are using GSON for conversion from JSON to POJO representation, you must ignore those POJO classes from being obfuscated.
23+
# Here include the POJO's that have you have created for mapping JSON response to POJO for example.

0 commit comments

Comments
 (0)