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

Side by Side Diff: chrome/android/java/proguard.flags

Issue 2079613002: Revamping -keeps for @annotations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing comments in flags file Created 4 years, 6 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 | chrome/android/java/src/org/chromium/chrome/browser/banners/AppDetailsDelegate.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Keep line number information, useful for stack traces. 1 # Keep line number information, useful for stack traces.
2 -keepattributes SourceFile,LineNumberTable 2 -keepattributes SourceFile,LineNumberTable
3 3
4 # Keep the annotations. 4 # Keep the annotations.
5 -keep @interface *** 5 -keep @interface ***
6 6
7 # Disable obfuscation for the following two packages. 7 # Disable obfuscation for the following two packages.
8 -keepnames class com.google.android.apps.chrome.**,org.chromium.** { 8 -keepnames class com.google.android.apps.chrome.**,org.chromium.** {
9 *; 9 *;
10 } 10 }
11 11
12 # Keep all the primitive and String constants for for the following two packages . 12 # Keep all the primitive and String constants for for the following two packages .
13 -keepclassmembers class com.google.android.apps.chrome.**,org.chromium.** { 13 -keepclassmembers class com.google.android.apps.chrome.**,org.chromium.** {
14 !private static final % *; 14 !private static final % *;
15 !private static final java.lang.String *; 15 !private static final java.lang.String *;
16 } 16 }
17 17
18 # Keep code annotated with the following annotations. 18 # Fragments are loaded using reflection via Fragment.instantiate(Context,String)
19 -keep class com.google.android.apps.chrome.**,org.chromium.** { 19 # This can be improved upon - see crbug.com/622023.
20 -keep public class com.google.android.apps.chrome** extends android.app.Fragment
21 -keep public class org.chromium** extends android.app.Fragment
22
23 # Keeps for class level annotations.
24 -keep @**.UsedByReflection class *
25 -keep @**.VisibleForTesting class *
26
27 # Keeps for method level annotations.
28 -keepclasseswithmembers class com.google.android.apps.chrome.** {
20 @**.AccessedByNative <fields>; 29 @**.AccessedByNative <fields>;
30 }
31 -keepclasseswithmembers class com.google.android.apps.chrome.** {
21 @**.CalledByNative <methods>; 32 @**.CalledByNative <methods>;
33 }
34 -keepclasseswithmembers class com.google.android.apps.chrome.** {
22 @**.CalledByNativeUnchecked <methods>; 35 @**.CalledByNativeUnchecked <methods>;
36 }
37 -keepclasseswithmembers class com.google.android.apps.chrome.** {
23 @**.JavascriptInterface <methods>; 38 @**.JavascriptInterface <methods>;
39 }
40 -keepclasseswithmembers class com.google.android.apps.chrome.** {
24 @**.NativeCall <methods>; 41 @**.NativeCall <methods>;
42 }
43 -keepclasseswithmembers class com.google.android.apps.chrome.** {
25 @**.UsedByReflection <methods>; 44 @**.UsedByReflection <methods>;
26 @**.VisibleForTesting *; 45 }
46 -keepclasseswithmembers class com.google.android.apps.chrome.** {
47 @**.VisibleForTesting <methods>;
48 }
49 -keepclasseswithmembers class com.google.android.apps.chrome.** {
50 native <methods>;
51 }
52 -keepclasseswithmembers class org.chromium.** {
53 @**.AccessedByNative <fields>;
54 }
55 -keepclasseswithmembers class org.chromium.** {
56 @**.CalledByNative <methods>;
57 }
58 -keepclasseswithmembers class org.chromium.** {
59 @**.CalledByNativeUnchecked <methods>;
60 }
61 -keepclasseswithmembers class org.chromium.** {
62 @**.JavascriptInterface <methods>;
63 }
64 -keepclasseswithmembers class org.chromium.** {
65 @**.NativeCall <methods>;
66 }
67 -keepclasseswithmembers class org.chromium.** {
68 @**.UsedByReflection <methods>;
69 }
70 -keepclasseswithmembers class org.chromium.** {
71 @**.VisibleForTesting <methods>;
72 }
73 -keepclasseswithmembers class org.chromium.** {
27 native <methods>; 74 native <methods>;
28 } 75 }
29 76
30 # Class merging provides negligible .dex size reduction and method count 77 # Class merging provides negligible .dex size reduction and method count
31 # reduction (about 0.3% improvement on method count, and 0.1% savings on size), 78 # reduction (about 0.3% improvement on method count, and 0.1% savings on size),
32 # and it messes up stack traces if the classes are optimized. Thus, it is in our 79 # and it messes up stack traces if the classes are optimized. Thus, it is in our
33 # best interests to turn it off. See crbug.com/620323 80 # best interests to turn it off. See crbug.com/620323
34 -optimizations !class/merging/* 81 -optimizations !class/merging/*
35 82
36 # Keep all runtime visible annotations 83 # Keep all runtime visible annotations
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 *; 212 *;
166 } 213 }
167 214
168 # TODO(yfriedman): Remove when crbug.com/488192 is fixed. 215 # TODO(yfriedman): Remove when crbug.com/488192 is fixed.
169 -dontwarn org.apache.http.conn.scheme.LayeredSocketFactory 216 -dontwarn org.apache.http.conn.scheme.LayeredSocketFactory
170 217
171 # Needed to run ChromeTest.apk 218 # Needed to run ChromeTest.apk
172 -keepnames class com.google.android.gms.common.GoogleApiAvailability { 219 -keepnames class com.google.android.gms.common.GoogleApiAvailability {
173 *; 220 *;
174 } 221 }
222
223 # Needed for chrome_sync_shell_test_apk. Note - these do no affect chrome_apk's
224 # size.
225 -keep class org.chromium.sync.protocol.* { *; }
OLDNEW
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/banners/AppDetailsDelegate.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698