Last active
November 30, 2016 06:28
-
-
Save minhanhhere/009fd7ce5a505e98d1b2 to your computer and use it in GitHub Desktop.
Global Android Proguard
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Global | |
-verbose | |
-dontpreverify | |
-repackageclasses | |
-allowaccessmodification | |
-optimizations !code/simplification/arithmetic, !field/*, !class/merging/* | |
-optimizationpasses 5 | |
## -dontobfuscate | |
# Common keep | |
-keepattributes *Annotation*, Signature, Exceptions | |
-keepattributes javax.xml.bind.annotation.* | |
-keepattributes javax.annotation.processing.* | |
-keepclassmembers class * extends java.lang.Enum { *; } | |
-keepclasseswithmembernames class android.** | |
-keepclasseswithmembernames interface android.** | |
-keepclasseswithmembernames class * { | |
native <methods>; | |
} | |
-keepclasseswithmembers class * { | |
public <init>(android.content.Context, android.util.AttributeSet); | |
} | |
-keepclasseswithmembers class * { | |
public <init>(android.content.Context, android.util.AttributeSet, int); | |
} | |
-keep public class * extends android.view.View { | |
public <init>(android.content.Context); | |
public <init>(android.content.Context, android.util.AttributeSet); | |
public <init>(android.content.Context, android.util.AttributeSet, int); | |
public void set*(...); | |
} | |
-keep class **$Properties | |
-keep public class * extends android.app.Activity | |
-keep public class * extends android.app.Application | |
-keep public class * extends android.app.Service | |
-keep public class * extends android.content.BroadcastReceiver | |
-keep public class * extends android.content.ContentProvider | |
-keepclassmembers class * implements android.os.Parcelable { | |
static android.os.Parcelable$Creator CREATOR; | |
} | |
-keepnames class * implements java.io.Serializable | |
-keepclassmembers class * implements java.io.Serializable { | |
static final long serialVersionUID; | |
private static final java.io.ObjectStreamField[] serialPersistentFields; | |
!static !transient <fields>; | |
private void writeObject(java.io.ObjectOutputStream); | |
private void readObject(java.io.ObjectInputStream); | |
java.lang.Object writeReplace(); | |
java.lang.Object readResolve(); | |
} | |
-keepclassmembers class **.R$* { | |
public static <fields>; | |
} | |
-keepclassmembers enum * { | |
public static **[] values(); | |
public static ** valueOf(java.lang.String); | |
} | |
# RxJava | |
-dontwarn rx.** | |
# GSON | |
-keep class com.google.gson.** { *; } | |
# Google Support library | |
-keep class android.support.v4.app.** { *; } | |
### DATABINDING | |
-keep class android.databinding.** { *; } | |
-keepnames class * implements java.io.Serializable | |
-keepclassmembers class * implements java.io.Serializable { | |
static final long serialVersionUID; | |
private static final java.io.ObjectStreamField[] serialPersistentFields; | |
!static !transient <fields>; | |
private void writeObject(java.io.ObjectOutputStream); | |
private void readObject(java.io.ObjectInputStream); | |
java.lang.Object writeReplace(); | |
java.lang.Object readResolve(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment