Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(387)

Side by Side Diff: components/cronet/android/proguard.cfg

Issue 2214013002: [Cronet] add base proguard flags (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: self review Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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>;
6 }
7 -keepclasseswithmembers class org.chromium.** {
8 @org.chromium.base.annotations.*Native* <methods>;
9 }
10
11 # TODO(mef) remove unnecessary classes from base, so we don't have to preserve
12 # their methods
13 -keepclasseswithmembers class org.chromium.** {
14 native <methods>;
15 }
16
17 # TODO(xunjieli): Find an alternative to explictly preserving public classes.
18 -keep public class org.chromium.net.*
19
20 -keep class org.chromium.net.impl.CronetUrlRequest$HeadersList 1 -keep class org.chromium.net.impl.CronetUrlRequest$HeadersList
21 -keep class org.chromium.net.impl.ChromiumUrlRequest$ResponseHeadersMap 2 -keep class org.chromium.net.impl.ChromiumUrlRequest$ResponseHeadersMap
22 3
23 # Needed so that multiple optimization passes will detect annotations 4 # Needed so that multiple optimization passes will detect annotations
24 -keepattributes *Annotation* 5 -keepattributes *Annotation*
smaier 2016/08/11 16:08:29 I'd wager you'll be able to remove this line. base
xunjieli 2016/08/11 21:05:53 Done. Thanks for pointing that out and explaining
25 6
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 *;
31 }
32
33 # Suppress unnecessary warnings. 7 # Suppress unnecessary warnings.
34 -dontnote org.chromium.net.ProxyChangeListener$ProxyReceiver 8 -dontnote org.chromium.net.ProxyChangeListener$ProxyReceiver
35 -dontnote org.chromium.net.AndroidKeyStore 9 -dontnote org.chromium.net.AndroidKeyStore
36 # Needs 'void setTextAppearance(int)' (API level 23). 10 # Needs 'void setTextAppearance(int)' (API level 23).
37 -dontwarn org.chromium.base.ApiCompatibilityUtils 11 -dontwarn org.chromium.base.ApiCompatibilityUtils
38 # Needs 'boolean onSearchRequested(android.view.SearchEvent)' (API level 23). 12 # Needs 'boolean onSearchRequested(android.view.SearchEvent)' (API level 23).
39 -dontwarn org.chromium.base.WindowCallbackWrapper 13 -dontwarn org.chromium.base.WindowCallbackWrapper
40 # Generated for chrome apk and not included into cronet. 14 # Generated for chrome apk and not included into cronet.
41 -dontwarn org.chromium.base.library_loader.NativeLibraries 15 -dontwarn org.chromium.base.library_loader.NativeLibraries
42 # Generated for chrome apk and not included into cronet. 16 # Generated for chrome apk and not included into cronet.
43 -dontwarn org.chromium.base.multidex.ChromiumMultiDexInstaller 17 -dontwarn org.chromium.base.multidex.ChromiumMultiDexInstaller
44 # Objects of this type are passed around by native code, but the class 18 # Objects of this type are passed around by native code, but the class
45 # is never used directly by native code. Since the class is not loaded, it does 19 # is never used directly by native code. Since the class is not loaded, it does
46 # not need to be preserved as an entry point. 20 # not need to be preserved as an entry point.
47 -dontnote org.chromium.net.UrlRequest$ResponseHeadersMap 21 -dontnote org.chromium.net.UrlRequest$ResponseHeadersMap
48 # https://android.googlesource.com/platform/sdk/+/marshmallow-mr1-release/files/ proguard-android.txt#54 22 # https://android.googlesource.com/platform/sdk/+/marshmallow-mr1-release/files/ proguard-android.txt#54
49 -dontwarn android.support.** 23 -dontwarn android.support.**
50 24
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698