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

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

Issue 2211433003: Obfuscation on for chromium code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tests seem to pass locally 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
« 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 # Disable obfuscation for the following two packages. 1 -renamesourcefileattribute PG
2 -keepnames,allowoptimization class com.google.android.apps.chrome.**,org.chromiu m.** { 2
3 *; 3 -repackageclasses ""
4 }
5 4
6 # Fragments are loaded using reflection via Fragment.instantiate(Context,String) 5 # Fragments are loaded using reflection via Fragment.instantiate(Context,String)
7 # This can be improved upon - see crbug.com/622023. 6 # This can be improved upon - see crbug.com/622023.
8 -keep public class com.google.android.apps.chrome** extends android.app.Fragment 7 -keep public class com.google.android.apps.chrome** extends android.app.Fragment
9 -keep public class org.chromium** extends android.app.Fragment 8 -keep public class org.chromium** extends android.app.Fragment
10 9
11 # Keep protobuf code used via reflection 10 # Keep protobuf code used via reflection
12 # TODO(tonyg): Removing these -keeps results in new notes, but nothing seems to 11 # TODO(tonyg): Removing these -keeps results in new notes, but nothing seems to
13 # break. This exclusion costs almost 100k of dex size so consider replacing it 12 # break. This exclusion costs almost 100k of dex size so consider replacing it
14 # with a -dontnote after more testing. 13 # with a -dontnote after more testing.
15 -keep class com.google.protobuf.** { 14 -keep class com.google.protobuf.** {
16 *** newBuilder(); 15 *** newBuilder();
17 *** parseFrom(java.io.InputStream); 16 *** parseFrom(java.io.InputStream);
18 } 17 }
19 18
20 # Keep the client interfaces for cacheinvalidation as they are used as 19 # Keep the client interfaces for cacheinvalidation as they are used as
21 # argument types for some of our code that we're keeping and proguard warns 20 # argument types for some of our code that we're keeping and proguard warns
22 # otherwise. 21 # otherwise.
23 -keep class com.google.ipc.invalidation.external.client.** { 22 -keep class com.google.ipc.invalidation.external.client.** {
24 *; 23 *;
25 } 24 }
26 25
26 # These classes aren't themselves referenced, but __ProcessService[0,1,2...] are
27 # referenced, and we look up these services by appending a number onto the name
28 # of the base class. Thus, we need to keep the base class name around so that
29 # the child classes can be looked up.
30 -keep class org.chromium.content.app.SandboxedProcessService
31 -keep class org.chromium.content.app.PrivilegedProcessService
32
27 # Keep all Parcelables as they might be marshalled outside Chrome. 33 # Keep all Parcelables as they might be marshalled outside Chrome.
28 -keepnames class * implements android.os.Parcelable { 34 -keepnames class * implements android.os.Parcelable {
29 public static final ** CREATOR; 35 public static final ** CREATOR;
30 } 36 }
31 37
32 # SearchView is used in website_preferences_menu.xml and is constructed by 38 # SearchView is used in website_preferences_menu.xml and is constructed by
33 # Android using reflection. 39 # Android using reflection.
34 -keep class android.support.v7.widget.SearchView { 40 -keep class android.support.v7.widget.SearchView {
35 public <init>(...); 41 public <init>(...);
36 } 42 }
37 43
38 # Google Play Services warnings are about its resources. 44 # Google Play Services warnings are about its resources.
39 -dontwarn com.google.android.gms.R** 45 -dontwarn com.google.android.gms.R**
40 46
41 # The support library contains references to newer platform versions. 47 # The support library contains references to newer platform versions.
42 # Don't warn about those in case this app is linking against an older 48 # Don't warn about those in case this app is linking against an older
43 # platform version. We know about them, and they are safe. 49 # platform version. We know about them, and they are safe.
44 -dontwarn android.support.** 50 -dontwarn android.support.**
45 51
46 # Proguard mistakenly optimizes away some null checks on final fields 52 # Proguard mistakenly optimizes away some null checks on final fields
47 # in the support library. 53 # in the support library.
48 # See https://sourceforge.net/p/proguard/bugs/531/#fdc9/41e2 54 # See https://sourceforge.net/p/proguard/bugs/531/#fdc9/41e2
49 -keepclassmembers,allowshrinking,allowobfuscation class android.support.v7.widge t.AppCompatButton { 55 -keepclassmembers,allowshrinking,allowobfuscation class android.support.v7.widge t.AppCompatButton {
50 !static final <fields>; 56 !static final <fields>;
51 } 57 }
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