Skip to content

Instantly share code, notes, and snippets.

@marcoRS
Last active May 29, 2017 12:43
Show Gist options
  • Save marcoRS/f7d588dc244207e4aa29 to your computer and use it in GitHub Desktop.
Save marcoRS/f7d588dc244207e4aa29 to your computer and use it in GitHub Desktop.
Retrofit, OkHttp, Gson, Dagger Proguard Configuration
# Retrofit, OkHttp, Gson
-keepattributes *Annotation*
-keepattributes Signature
-keep class com.squareup.okhttp.** { *; }
-keep interface com.squareup.okhttp.** { *; }
-dontwarn com.squareup.okhttp.**
-dontwarn rx.**
-dontwarn retrofit.**
-keep class retrofit.** { *; }
-keepclasseswithmembers class * {
@retrofit.http.* <methods>;
}
-keep class sun.misc.Unsafe { *; }
-dontwarn java.nio.file.*
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
# Dagger
-keep class * extends dagger.internal.Binding
-keep class * extends dagger.internal.ModuleAdapter
-keep class * extends dagger.internal.StaticInjection
-keep class * extends dagger.internal.BindingsGroup
-dontwarn dagger.internal.**
@khan-tm
Copy link

khan-tm commented May 29, 2017

Can you please update it according to latest versions like okhttp 3 and all. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment