1 # Keep annotations used by chromium to keep members referenced by native code
2 -keep class org.chromium.base.annotations.*Native*
3 -keep class org.chromium.base.annotations.JNINamespace
4 -keepclasseswithmembers class org.chromium.** {
5 @org.chromium.base.annotations.AccessedByNative <fields>;
7 -keepclasseswithmembers class org.chromium.** {
8 @org.chromium.base.annotations.*Native* <methods>;
11 # TODO(mef) remove unnecessary classes from base, so we don't have to preserve
13 -keepclasseswithmembers class org.chromium.** {
17 # TODO(xunjieli): Find an alternative to explictly preserving public classes.
18 -keep public class org.chromium.net.*
20 -keep class org.chromium.net.CronetUrlRequest$HeadersList
21 -keep class org.chromium.net.ChromiumUrlRequest$ResponseHeadersMap
23 # Needed so that multiple optimization passes will detect annotations
24 -keepattributes *Annotation*
26 # Keep methods used by reflection
27 -keep class org.chromium.base.annotations.UsedByReflection
28 -keep @org.chromium.base.annotations.UsedByReflection class *
29 -keepclassmembers class * {
30 @org.chromium.base.annotations.UsedByReflection *;
33 # Suppress unnecessary warnings.
34 -dontnote org.chromium.net.ProxyChangeListener$ProxyReceiver
35 -dontnote org.chromium.net.AndroidKeyStore
36 -dontwarn org.chromium.base.library_loader.NativeLibraries
37 # Objects of this type are passed around by native code, but the class
38 # is never used directly by native code. Since the class is not loaded, it does
39 # not need to be preserved as an entry point.
40 -dontnote org.chromium.net.UrlRequest$ResponseHeadersMap