Skip to content

Instantly share code, notes, and snippets.

@orhanobut
Created November 6, 2014 15:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save orhanobut/402893a2a7b7bc6cb20f to your computer and use it in GitHub Desktop.
Save orhanobut/402893a2a7b7bc6cb20f to your computer and use it in GitHub Desktop.
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /Applications/Android Studio.app/sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# card.io rules
-keep class io.card.**
-keepclassmembers class io.card.** {
*;
}
#Newrelic
-keep class com.newrelic.** { *; }
-dontwarn com.newrelic.**
-keepattributes Exceptions, Signature, InnerClasses
#EventBus
-keepclassmembers class ** {
public void onEvent*(**);
}
#ButterKnife
-dontwarn butterknife.internal.**
-keep class **$$ViewInjector { *; }
-keepnames class * { @butterknife.InjectView *;}
#Retrofit
-keep class com.google.gson.** { *; }
-keep class com.google.inject.** { *; }
-keep class org.apache.http.** { *; }
-keep class org.apache.james.mime4j.** { *; }
-keep class javax.inject.** { *; }
-keep class retrofit.** { *; }
-dontwarn retrofit.**
#Dagger
# http://stackoverflow.com/a/18177491/37020
# https://plus.google.com/114746422988923214718/posts/fhFucCgy8gr
-keepattributes *Annotation*
-keepclassmembers,allowobfuscation class * {
@javax.inject.* *;
@dagger.* *;
<init>();
}
-keep class **$$ModuleAdapter
-keep class **$$InjectAdapter
-keep class **$$StaticInjection
-keepnames !abstract class com.example.mypackage.**
-keepnames class dagger.Lazy
# Gradle includes dagger-compiler and javawriter in the final package
-dontwarn dagger.internal.codegen.**
-dontwarn com.squareup.javawriter.**
-dontwarn org.mockito.**
-dontwarn okio.**
-dontwarn org.objenesis.**
-dontwarn com.squareup.okhttp.**
# Remove logs
-assumenosideeffects class android.util.Log {
public static boolean isLoggable(java.lang.String, int);
public static int v(...);
public static int i(...);
public static int w(...);
public static int d(...);
public static int e(...);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment