summaryrefslogtreecommitdiffstats
path: root/components/cronet/android/proguard.cfg
blob: 52a3a5933b8d0c3b732e033c4d2d222098b31ce3 (plain)
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
# Keep annotations used by chromium to keep members referenced by native code
-keep class org.chromium.base.annotations.*Native*
-keep class org.chromium.base.annotations.JNINamespace
-keepclasseswithmembers class org.chromium.** {
    @org.chromium.base.annotations.AccessedByNative <fields>;
}
-keepclasseswithmembers class org.chromium.** {
    @org.chromium.base.annotations.*Native* <methods>;
}

# TODO(mef) remove unnecessary classes from base, so we don't have to preserve
# their methods
-keep class org.chromium.** {
    native <methods>;
}

# Needed so that multiple optimization passes will detect annotations
-keepattributes *Annotation*

# Keep methods used by reflection
-keep class org.chromium.base.annotations.UsedByReflection
-keep @org.chromium.base.annotations.UsedByReflection class *
-keepclassmembers class * {
    @org.chromium.base.annotations.UsedByReflection *;
}

# Suppress unnecessary warnings.
-dontnote org.chromium.net.ProxyChangeListener$ProxyReceiver
-dontnote org.chromium.net.AndroidKeyStore
# Objects of this type are passed around by native code, but the class
# is never used directly by native code. Since the class is not loaded, it does
# not need to be preserved as an entry point.
-dontnote org.chromium.net.UrlRequest$ResponseHeadersMap