Skip to content

Instantly share code, notes, and snippets.

@danySam
Created July 2, 2019 15:19
Show Gist options
  • Save danySam/06b21040c0d0a47cdcc609b1aa0455e1 to your computer and use it in GitHub Desktop.
Save danySam/06b21040c0d0a47cdcc609b1aa0455e1 to your computer and use it in GitHub Desktop.
Proguard
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# 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 *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
#Rules for branch.io integration
-keep class com.google.android.gms.ads.identifier.** { *; }
#Ignore warnings
-ignorewarnings
#issue signed APK
-keep class * {
public private *;
}
-dontwarn com.yalantis.ucrop**
-keep class com.yalantis.ucrop** { *; }
-keep interface com.yalantis.ucrop** { *; }
# Crashlytics
-keepattributes *Annotation*
-keepattributes SourceFile,LineNumberTable
-keep public class * extends java.lang.Exception
#Remove logs
-assumenosideeffects class android.util.Log {
public static *** v(...);
public static *** d(...);
public static *** i(...);
public static *** w(...);
public static *** e(...);
}
# Retain generic type information for use by reflection by converters and adapters.
-keepattributes Signature
# Retain service method parameters.
-keepclassmembernames,allowobfuscation interface * {
@retrofit2.http.* <methods>;
}
# Ignore annotation used for build tooling.
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment