forked from android/android-test
-
Notifications
You must be signed in to change notification settings - Fork 0
/
proguard_binary.cfg
54 lines (43 loc) · 1.85 KB
/
proguard_binary.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Common proguard options for released binaries.
# This file itself does not need to be released, as the binaries are already proguarded.
-keepattributes * # Necessary to allow debugging
# This prevents the names of native methods from being obfuscated and prevents
# UnsatisfiedLinkErrors.
-keepclasseswithmembernames class * {
native <methods>;
}
# Enums. Allow instantiation via reflection by keeping the values method.
-keepclassmembers enum * {
public static **[] values();
}
# Parcel reflectively accesses this field.
-keepclassmembers class * implements android.os.Parcelable {
public static *** CREATOR;
}
# These methods are needed to ensure that serialization behaves as expected when
# classes are obfuscated, shrunk, and/or optimized.
-keepclassmembers class * implements java.io.Serializable {
static final long serialVersionUID;
private static final java.io.ObjectStreamField[] serialPersistentFields;
private void writeObject(java.io.ObjectOutputStream);
private void readObject(java.io.ObjectInputStream);
java.lang.Object writeReplace();
java.lang.Object readResolve();
}
# Skipping analysis of some classes may make proguard strip something that's
# needed.
-dontskipnonpubliclibraryclasses
# don't rename classes, because they need to be in original packages so later
# steps can remove any unneeded packages entirely from jar
-dontobfuscate
# for now, turn off optimization since this makes a lot of classes/methods final
-dontoptimize
# Annotations required to build services object with Bazel
-dontwarn javax.annotation.**
-dontwarn com.google.errorprone.annotations.**
-dontwarn com.google.j2objc.annotations.RetainedWith
-dontwarn com.google.j2objc.annotations.Weak
-dontwarn java.lang.ClassValue
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
-dontwarn sun.misc.Unsafe
-dontwarn org.checkerframework.**