Skip to content

Instantly share code, notes, and snippets.

@silentsudo
Last active May 12, 2016 18:02
Show Gist options
  • Save silentsudo/3934911574d0182ed51b083a4d42c342 to your computer and use it in GitHub Desktop.
Save silentsudo/3934911574d0182ed51b083a4d42c342 to your computer and use it in GitHub Desktop.
Android proguard retrofit butterknife twitter fabric digits fresco facebook android-support android-google-play-services ok-http ok-io
#-------------------App Package-------------
-keep class com.mymodels.package.** { *;}
-dontwarn com.mymodels.package.**
#-----------General Keep attr-----------
-keepattributes Exceptions
-keepattributes InnerClasses
-keepattributes Signature
-keepattributes Deprecated
-keepattributes SourceFile
-keepattributes LineNumberTable
-keepattributes *Annotation*
-keepattributes EnclosingMethod
#----------------------Facebook and fresco----------------------
-keepattributes Signature
-keep class com.facebook.** {
*;
}
-keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip
# Do not strip any method/class that is annotated with @DoNotStrip
-keep @com.facebook.common.internal.DoNotStrip class *
-keepclassmembers class * {
@com.facebook.common.internal.DoNotStrip *;
}
# Keep native methods
-keepclassmembers class * {
native <methods>;
}
-dontwarn okio.**
-dontwarn javax.annotation.**
-dontwarn javax.lang.**
-dontwarn com.android.volley.toolbox.**
#----------------Android support v7-----------------------
-keep public class android.support.v7.widget.** { *; }
-keep public class android.support.v7.internal.widget.** { *; }
-keep public class android.support.v7.internal.view.menu.** { *; }
-keep public class * extends android.support.v4.view.ActionProvider {
public <init>(android.content.Context);
}
#---------------------Support design----------
-dontwarn android.support.**
-dontwarn android.support.design.**
-keep class android.support.design.** { *; }
-keep interface android.support.design.** { *; }
-keep public class android.support.design.R$* { *; }
#------------------------Retrofit 1.9 ---------
-keep class com.squareup.okhttp.** { *; }
-keep class retrofit.** { *; }
-keep interface com.squareup.okhttp.** { *; }
-dontwarn com.squareup.okhttp.**
-dontwarn okio.**
-dontwarn retrofit.**
-dontwarn rx.**
-keepclasseswithmembers class * {
@retrofit.http.* <methods>;
}
-keep class org.apache.http.** { *; }
-dontwarn org.apache.http.**
-keep class org.apache.james.mime4j.* { *; }
-dontwarn org.apache.james.mime4j.*
-keep class javax.inject.** { *; }
#-------------ok http and ok io---------
-keepattributes Signature
-keepattributes *Annotation*
-keep class com.squareup.okhttp.** { *; }
-keep interface com.squareup.okhttp.** { *; }
-dontwarn com.squareup.okhttp.**
-keep class com.squareup.okhttp.** { *; }
-keep class sun.misc.Unsafe { *; }
-dontwarn java.nio.file.*
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
-dontwarn okio.**
-keep class okio.** { *; }
#---------------Google Gson-------------
-keepattributes Signature
-keepattributes *Annotation*
-keepattributes EnclosingMethod
-keep class sun.misc.Unsafe { *; }
-keep class com.google.gson.stream.** { *; }
#----------Twitter--------------
-keep class com.twitter.sdk.** { *; }
-dontwarn com.twitter.sdk.**
-keep class io.fabric.sdk.** { *; }
-dontwarn io.fabric.sdk.**
-keep class com.crashlytics.** { *; }
-dontwarn com.crashlytics.**
-keep class com.digits.sdk.** { *; }
-dontwarn com.digits.sdk.**
#-----------Image Loader----------
-keep class com.nostra13.universalimageloader.** { *; }
-dontwarn com.nostra13.universalimageloader.**
#-----------Logger----------
-keep class com.orhanobut.** { *; }
-dontwarn com.orhanobut.**
#-------Butterknief---
-keep class butterknife.** { *; }
-dontwarn butterknife.**
-dontwarn butterknife.internal.**
-keep class **$$ViewBinder { *; }
-keepclasseswithmembernames class * {
@butterknife.* <fields>;
}
-keepclasseswithmembernames class * {
@butterknife.* <methods>;
}
#-------------------Google Play Services------------
-keep class * extends java.util.ListResourceBundle {
protected Object[][] getContents();
}
-keep public class com.google.android.gms.common.internal.safeparcel.SafeParcelable {
public static final *** NULL;
}
-keepnames @com.google.android.gms.common.annotation.KeepName class *
-keepclassmembernames class * {
@com.google.android.gms.common.annotation.KeepName *;
}
-keepnames class * implements android.os.Parcelable {
public static final ** CREATOR;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment