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

Side by Side Diff: base/android/proguard/chromium_code.flags

Issue 2329573002: Refactor base's proguard flags to be more usable by cronet (Closed)
Patch Set: Created 4 years, 3 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 | « base/android/proguard/chromium_apk.flags ('k') | base/android/release_proguard_config.flags » ('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 # Copyright 2016 The Chromium Authors. All rights reserved.
2 -keepattributes SourceFile,LineNumberTable 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 # Contains flags that can be safely shared with Cronet, and thus would be
6 # appropriate for third-party apps to include.
3 7
4 # Keep all annotation related attributes that can affect runtime 8 # Keep all annotation related attributes that can affect runtime
5 -keepattributes RuntimeVisible*Annotations 9 -keepattributes RuntimeVisible*Annotations
6 -keepattributes AnnotationDefault 10 -keepattributes AnnotationDefault
7 11
8 # Keep the annotations, because if we don't, the ProGuard rules that use them 12 # Keep the annotations, because if we don't, the ProGuard rules that use them
9 # will not be respected. These classes then show up in our final dex, which we 13 # will not be respected. These classes then show up in our final dex, which we
10 # do not want - see crbug.com/628226. 14 # do not want - see crbug.com/628226.
11 -keep @interface org.chromium.base.annotations.AccessedByNative 15 -keep @interface org.chromium.base.annotations.AccessedByNative
12 -keep @interface org.chromium.base.annotations.CalledByNative 16 -keep @interface org.chromium.base.annotations.CalledByNative
(...skipping 14 matching lines...) Expand all
27 -keepclasseswithmembers,includedescriptorclasses class * { 31 -keepclasseswithmembers,includedescriptorclasses class * {
28 @org.chromium.base.annotations.CalledByNativeUnchecked <methods>; 32 @org.chromium.base.annotations.CalledByNativeUnchecked <methods>;
29 } 33 }
30 -keepclasseswithmembers class * { 34 -keepclasseswithmembers class * {
31 @org.chromium.base.annotations.UsedByReflection <methods>; 35 @org.chromium.base.annotations.UsedByReflection <methods>;
32 } 36 }
33 -keepclasseswithmembers,includedescriptorclasses class * { 37 -keepclasseswithmembers,includedescriptorclasses class * {
34 native <methods>; 38 native <methods>;
35 } 39 }
36 40
41 # Remove methods annotated with this if their return value is unused.
42 -assumenosideeffects class ** {
43 @org.chromium.base.annotations.RemovableInRelease <methods>;
44 }
45
37 # Keep all CREATOR fields within Parcelable that are kept. 46 # Keep all CREATOR fields within Parcelable that are kept.
38 -keepclassmembers class * implements android.os.Parcelable { 47 -keepclassmembers class org.chromium.** implements android.os.Parcelable {
39 public static *** CREATOR; 48 public static *** CREATOR;
40 } 49 }
41 50
42 # Don't obfuscate Parcelables as they might be marshalled outside Chrome. 51 # Don't obfuscate Parcelables as they might be marshalled outside Chrome.
43 # If we annotated all Parcelables that get put into Bundles other than 52 # If we annotated all Parcelables that get put into Bundles other than
44 # for saveInstanceState (e.g. PendingIntents), then we could actually keep the 53 # for saveInstanceState (e.g. PendingIntents), then we could actually keep the
45 # names of just those ones. For now, we'll just keep them all. 54 # names of just those ones. For now, we'll just keep them all.
46 -keepnames class * implements android.os.Parcelable 55 -keepnames class org.chromium.** implements android.os.Parcelable
47
48 # Remove methods annotated with this if their return value is unused
49 -assumenosideeffects class ** {
50 @org.chromium.base.annotations.RemovableInRelease <methods>;
51 }
52 56
53 # Keep all enum values and valueOf methods. See 57 # Keep all enum values and valueOf methods. See
54 # http://proguard.sourceforge.net/index.html#manual/examples.html 58 # http://proguard.sourceforge.net/index.html#manual/examples.html
55 # for the reason for this. Also, see http://crbug.com/248037. 59 # for the reason for this. Also, see http://crbug.com/248037.
56 -keepclassmembers enum * { 60 -keepclassmembers enum org.chromium.** {
57 public static **[] values(); 61 public static **[] values();
58 } 62 }
59
OLDNEW
« no previous file with comments | « base/android/proguard/chromium_apk.flags ('k') | base/android/release_proguard_config.flags » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698