1 # Keep line number information, useful for stack traces.
2 -keepattributes SourceFile,LineNumberTable
4 # Keep all runtime visible annotations
5 -keepattributes RuntimeVisibleAnnotations
7 # Keep the annotations.
10 # A lot of code in org.chromium is used by both the internal Chrome code and by
11 # ChromeShell tests. It doesn't make sense to mark such things as
12 # @VisibleForTesting. For now, just keep everything in org.chromium.
13 -keep class org.chromium.** {
17 # Keep code annotated with the following annotations.
19 @**.AccessedByNative <fields>;
20 @**.CalledByNative <methods>;
21 @**.CalledByNativeUnchecked <methods>;
22 @**.JavascriptInterface <methods>;
23 @**.NativeCall <methods>;
24 @**.UsedByReflection <methods>;
25 @**.VisibleForTesting *;
29 # Keep the client interfaces for cacheinvalidation as they are used as
30 # argument types for some of our code that we're keeping and proguard warns
32 -keep class com.google.ipc.invalidation.external.client.** {
35 -keep class com.google.protos.ipc.invalidation.** {
39 # Keep all enum values and valueOf methods. See
40 # http://proguard.sourceforge.net/index.html#manual/examples.html
41 # for the reason for this. Also, see http://crbug.com/248037.
42 -keepclassmembers enum * {
43 public static **[] values();
44 public static ** valueOf(java.lang.String);
47 # Keep all Parcelables as they might be marshalled outside Chrome.
48 -keep class * implements android.os.Parcelable {
49 public static final ** CREATOR;
52 # SearchView is used in website_preferences_menu.xml and is constructed by
53 # Android using reflection.
54 -keep class android.support.v7.widget.SearchView {
58 -keep class android.support.v7.app.AlertDialog {
59 public ** getButton(int);
62 # Google Play Services warnings are about its resources.
63 -dontwarn com.google.android.gms.R**
65 # TODO(yfriedman): Remove when crbug.com/488192 is fixed.
66 -dontwarn org.apache.http.**
68 # The support library contains references to newer platform versions.
69 # Don't warn about those in case this app is linking against an older
70 # platform version. We know about them, and they are safe.
71 -dontwarn android.support.**
73 -dontwarn javax.annotation.Nullable
75 # TODO(aurimas): remove this when Google Play Services no longer uses setLatestEventInfo call
76 # that was deprecated in Android M. It is save to suppress this according to b/18510449.
77 -dontwarn com.google.android.gms.common.GooglePlayServicesUtil