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

Side by Side Diff: android_webview/apk/java/proguard.flags

Issue 1218303002: Update WebView proguard configuration. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Most of the flags in this file are duplicated to refer to both the pre- and 1 # Don't rename anything, it makes stack traces unintelligible. We only allow the
2 # post-jarjar remapping versions of the class names. This enables the same 2 # obfuscation pass to run so that we can discard attributes like local variable
3 # config file to be used whether jarjar is enabled or not. 3 # tables.
4 -keepnames class *** { *; }
4 5
6 # Keep source file and line number information for stack traces.
7 -keepattributes SourceFile,LineNumberTable
8
9 # Keep all runtime visible annotations.
10 -keepattributes RuntimeVisibleAnnotations
11
12 # Disable optimization as this causes proguard to remove seemingly random stuff,
13 # including things explicitly kept in this configuration.
14 -dontoptimize
5 15
6 # Keep the factory and its public members; it's the main entry point used by the 16 # Keep the factory and its public members; it's the main entry point used by the
7 # framework. 17 # framework.
8 -keep class com.android.webview.chromium.WebViewChromiumFactoryProvider { 18 -keep class com.android.webview.chromium.WebViewChromiumFactoryProvider {
9 public *; 19 public *;
10 } 20 }
11 21
12 # Keep the native methods bound to plat_support. 22 # Keep JNI interfaces.
13 -keepclasseswithmembers class com.android.webview.chromium.** { 23 -keepclasseswithmembers class com.android.webview.chromium.**,org.chromium.** {
dgn 2015/07/02 16:10:00 Why not the grouped format like we do in chrome?
24 @**.AccessedByNative <fields>;
25 }
26 -keepclasseswithmembers class com.android.webview.chromium.**,org.chromium.** {
27 @**.CalledByNative <methods>;
28 }
29 -keepclasseswithmembers class com.android.webview.chromium.**,org.chromium.** {
30 @**.CalledByNativeUnchecked <methods>;
31 }
32 -keepclasseswithmembers class com.android.webview.chromium.**,org.chromium.** {
14 native <methods>; 33 native <methods>;
15 } 34 }
16 35
17 # Keep everything related to the org.chromium JNI interface. 36 # Keep things explicitly marked as used by reflection
18 -keepclasseswithmembers class com.android.org.chromium.** { 37 -keepclasseswithmembers class com.android.webview.chromium.**,org.chromium.** {
19 @**.AccessedByNative <fields>; 38 @**.UsedByReflection *;
20 }
21 -keepclasseswithmembers class com.android.org.chromium.** {
22 @**.CalledByNative <methods>;
23 }
24 -keepclasseswithmembers class com.android.org.chromium.** {
25 @**.CalledByNativeUnchecked <methods>;
26 }
27 -keepclasseswithmembers class com.android.org.chromium.** {
28 native <methods>;
29 } 39 }
30 40
31 # Keep methods which get bound to JS interfaces via reflection. 41 # Linker dynamically casts to $TestRunner when running tests. We don't run these
32 -keepclasseswithmembers class com.android.org.chromium.** { 42 # tests in WebView.
33 @**.JavascriptInterface <methods>; 43 -dontnote org.chromium.base.library_loader.Linker$TestRunner
34 }
35 44
36 # Silence notes caused by use of @VisibleForTesting inside guava. This doesn't 45 # Don't note about the API 21 compatibility code which references various
37 # happen when using jarjar because @VisibleForTesting gets renamed as well. 46 # hidden APIs via reflection.
38 -dontnote com.google.common.annotations.VisibleForTesting 47 -dontnote com.android.webview.chromium.WebViewDelegateFactory$Api21Compatibility Delegate
48
49 # DefaultAndroidKeyStore uses reflection to access internal OpenSSL state.
50 -dontnote org.chromium.net.DefaultAndroidKeyStore
39 51
40 # MediaPlayerBridge uses reflection to access internal metadata. 52 # MediaPlayerBridge uses reflection to access internal metadata.
41 -dontnote com.android.org.chromium.media.MediaPlayerBridge 53 -dontnote org.chromium.media.MediaPlayerBridge
42
43 # AndroidKeyStore uses reflection to access internal OpenSSL state.
44 -dontnote com.android.org.chromium.net.AndroidKeyStore
45
46 # TraceEvent uses reflection to access internal trace info.
47 -dontnote com.android.org.chromium.content.common.TraceEvent
48 54
49 # ProxyChangeListener$ProxyReceiver uses reflection to access internal 55 # ProxyChangeListener$ProxyReceiver uses reflection to access internal
50 # android.net.ProxyProperties. 56 # android.net.ProxyProperties.
51 -dontnote com.android.org.chromium.net.ProxyChangeListener$ProxyReceiver 57 -dontnote org.chromium.net.ProxyChangeListener$ProxyReceiver
52 58
53 # com.android.org.chromium.content.app.Linker dynamically casts to $TestRunner 59 # Silence warnings about reflection used to check for onShow/HideCustomView.
54 # when running tests. We don't run these tests in WebView. 60 # This class is not really kept since it's in a library jar.
55 -dontnote com.android.org.chromium.content.app.Linker$TestRunner 61 -keep class android.webkit.WebChromeClient {
56 62 void onShowCustomView(...);
57 # We need to keep these explicitly as they are parameters to methods which 63 void onHideCustomView();
sgurun-gerrit only 2015/07/06 17:37:24 Why don't we need this section anymore?
Torne 2015/07/07 10:56:59 The descriptor classes are always referenced (by t
58 # are entry points via @calledByNative.
59 -keep class com.android.org.chromium.ui.autofill.AutofillSuggestion
60 -keep class com.android.org.chromium.content.browser.ContentVideoViewClient
61 -keep class com.android.org.chromium.ui.ColorSuggestion
62 -keep class com.android.org.chromium.content.browser.input.DateTimeSuggestion
63 -keep class com.android.org.chromium.content.browser.ContentViewCore$JavaScriptC allback
64 -keep class com.android.org.chromium.content_public.browser.NavigationController
65
66 # Keep these classes as they are parameters to methods that are native entry poi nts.
67 -keep class com.android.org.chromium.android_webview.AwBrowserContext
68 -keep class com.android.org.chromium.base.library_loader.Linker$LibInfo
69
70 # Keep this class and members as accessed via reflection
71 -keep class com.android.webview.chromium.Drp {
72 public *;
73 } 64 }
74 65
75 # Keep finalizer stuff from google-common used via reflection 66 # Accessed via reflection
76 -keepclassmembers class com.android.org.chromium.com.google.common.** { 67 -keep class com.android.webview.chromium.Drp {
77 *** finalizeReferent(); 68 public java.lang.String KEY;
78 }
79 -keepclassmembers class com.android.org.chromium.com.google.common.** {
80 *** startFinalizer(java.lang.Class,java.lang.Object);
81 } 69 }
82 70
83 # Keep support framework support for SmartClip. 71 # Keep framework support for SmartClip.
84 -keep class com.android.webview.chromium.WebViewChromium { 72 -keep class com.android.webview.chromium.WebViewChromium {
85 public void extractSmartClipData(int,int,int,int); 73 public void extractSmartClipData(int,int,int,int);
86 public void setSmartClipResultHandler(android.os.Handler); 74 public void setSmartClipResultHandler(android.os.Handler);
87 } 75 }
88 76
89 # We need to explicitly keep classes and constructors referenced only in 77 # Ignore notes about the support library's use of reflection.
90 # layout resources. 78 -dontnote android.support.**
91 -keep class com.android.org.chromium.ui.ColorPickerAdvanced { 79
92 <init>(...); 80 # Keep all enum values and valueOf methods. See
81 # http://proguard.sourceforge.net/index.html#manual/examples.html
82 # for the reason for this. Also, see http://crbug.com/248037.
83 -keepclassmembers enum * {
84 public static **[] values();
85 public static ** valueOf(java.lang.String);
93 } 86 }
94
95 -keep class com.android.org.chromium.ui.ColorPickerSimple {
96 <init>(...);
97 }
98
99 -keep class com.android.org.chromium.ui.ColorPickerMoreButton {
100 <init>(...);
101 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698