1
2# This file is intended to contain proguard options that *nobody* would ever
3# not want, in *any* configuration - they ensure basic correctness, and have
4# no downsides. You probably do not want to make changes to this file.
5
6# The presence of both of these attributes causes dalvik and other jvms to print
7# stack traces on uncaught exceptions, which is necessary to get useful crash
8# reports.
9-keepattributes SourceFile,LineNumberTable
10
11# Preverification was introduced in Java 6 to enable faster classloading, but
12# dex doesn't use the java .class format, so it has no benefit and can cause
13# problems.
14-dontpreverify
15
16# Skipping analysis of some classes may make proguard strip something that's
17# needed.
18-dontskipnonpubliclibraryclasses
19
20# Case-insensitive filesystems can't handle when a.class and A.class exist in
21# the same directory.
22-dontusemixedcaseclassnames
23
24# This prevents the names of native methods from being obfuscated and prevents
25# UnsatisfiedLinkErrors.
26-keepclasseswithmembernames class * {
27    native <methods>;
28}
29
30# hackbod discourages the use of enums on android, but if you use them, they
31# should work. Allow instantiation via reflection by keeping the values method.
32-keepclassmembers enum * {
33    public static **[] values();
34}
35
36# Parcel reflectively accesses this field.
37-keepclassmembers class * implements android.os.Parcelable {
38  public static *** CREATOR;
39}
40
41# These methods are needed to ensure that serialization behaves as expected when
42# classes are obfuscated, shrunk, and/or optimized.
43-keepclassmembers class * implements java.io.Serializable {
44    static final long serialVersionUID;
45    private static final java.io.ObjectStreamField[] serialPersistentFields;
46    private void writeObject(java.io.ObjectOutputStream);
47    private void readObject(java.io.ObjectInputStream);
48    java.lang.Object writeReplace();
49    java.lang.Object readResolve();
50}
51
52# Don't warn about Guava. Any Guava-using app will fail the proguard stage without this dontwarn,
53# and since Guava is so widely used, we include it here in the base.
54-dontwarn com.google.common.**
55
56# Don't warn about Error Prone annotations (e.g. @CompileTimeConstant)
57-dontwarn com.google.errorprone.annotations.**
58
59# Based on http://ag/718466: android.app.Notification.setLatestEventInfo() was
60# removed in MNC, but is still referenced (safely) by the NotificationCompat
61# code.
62-dontwarn android.app.Notification
63
64# Silence notes about dynamically referenced classes from AOSP support
65# libraries.
66-dontnote android.graphics.Insets
67
68# AOSP support library:  ICU references to gender and plurals messages.
69-dontnote libcore.icu.ICU
70-keep class libcore.icu.ICU { *** get(...);}
71
72# AOSP support library:  Handle classes that use reflection.
73-dontnote android.support.v4.app.NotificationCompatJellybean
74