Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 # Fragments are loaded using reflection via Fragment.instantiate(Context,String) | 12 # Fragments are loaded using reflection via Fragment.instantiate(Context,String) |
| 13 # This can be improved upon - see crbug.com/622023. | 13 # This can be improved upon - see crbug.com/622023. |
| 14 -keep public class com.google.android.apps.chrome** extends android.app.Fragment | 14 -keep public class com.google.android.apps.chrome** extends android.app.Fragment |
| 15 -keep public class org.chromium** extends android.app.Fragment | 15 -keep public class org.chromium** extends android.app.Fragment |
| 16 | 16 |
| 17 # Keeps for class level annotations. | 17 # Keeps for class level annotations. |
| 18 -keep @**.UsedByReflection class * | 18 -keep @org.chromium.base.annotations.UsedByReflection class com.google.android.a pps.chrome.** |
|
agrieve
2016/07/15 14:44:34
I think we're fine to leave the right-hand-side of
| |
| 19 -keep @**.VisibleForTesting class * | 19 -keep @org.chromium.base.annotations.UsedByReflection class org.chromium.** |
| 20 -keep @org.chromium.base.VisibleForTesting class com.google.android.apps.chrome. ** | |
| 21 -keep @org.chromium.base.VisibleForTesting class org.chromium.** | |
| 20 | 22 |
| 21 # Keeps for method level annotations. | 23 # Keeps for method level annotations. |
| 22 -keepclasseswithmembers class com.google.android.apps.chrome.** { | 24 -keepclasseswithmembers class com.google.android.apps.chrome.** { |
| 23 @**.AccessedByNative <fields>; | 25 @org.chromium.base.annotations.AccessedByNative <fields>; |
| 24 } | 26 } |
| 25 -keepclasseswithmembers class com.google.android.apps.chrome.** { | 27 -keepclasseswithmembers class com.google.android.apps.chrome.** { |
| 26 @**.CalledByNative <methods>; | 28 @org.chromium.base.annotations.CalledByNative <methods>; |
| 27 } | 29 } |
| 28 -keepclasseswithmembers class com.google.android.apps.chrome.** { | 30 -keepclasseswithmembers class com.google.android.apps.chrome.** { |
| 29 @**.CalledByNativeUnchecked <methods>; | 31 @org.chromium.base.annotations.CalledByNativeUnchecked <methods>; |
| 30 } | 32 } |
| 31 -keepclasseswithmembers class com.google.android.apps.chrome.** { | 33 -keepclasseswithmembers class com.google.android.apps.chrome.** { |
| 32 @**.JavascriptInterface <methods>; | 34 @org.chromium.base.annotations.NativeCall <methods>; |
| 33 } | 35 } |
| 34 -keepclasseswithmembers class com.google.android.apps.chrome.** { | 36 -keepclasseswithmembers class com.google.android.apps.chrome.** { |
| 35 @**.NativeCall <methods>; | 37 @org.chromium.base.annotations.UsedByReflection <methods>; |
| 36 } | 38 } |
| 37 -keepclasseswithmembers class com.google.android.apps.chrome.** { | 39 -keepclasseswithmembers class com.google.android.apps.chrome.** { |
| 38 @**.UsedByReflection <methods>; | 40 @org.chromium.base.VisibleForTesting <methods>; |
| 39 } | |
| 40 -keepclasseswithmembers class com.google.android.apps.chrome.** { | |
| 41 @**.VisibleForTesting <methods>; | |
| 42 } | 41 } |
| 43 -keepclasseswithmembers class com.google.android.apps.chrome.** { | 42 -keepclasseswithmembers class com.google.android.apps.chrome.** { |
| 44 native <methods>; | 43 native <methods>; |
| 45 } | 44 } |
| 46 -keepclasseswithmembers class org.chromium.** { | 45 -keepclasseswithmembers class org.chromium.** { |
| 47 @**.AccessedByNative <fields>; | 46 @org.chromium.base.annotations.AccessedByNative <fields>; |
| 48 } | 47 } |
| 49 -keepclasseswithmembers class org.chromium.** { | 48 -keepclasseswithmembers class org.chromium.** { |
| 50 @**.CalledByNative <methods>; | 49 @org.chromium.base.annotations.CalledByNative <methods>; |
| 51 } | 50 } |
| 52 -keepclasseswithmembers class org.chromium.** { | 51 -keepclasseswithmembers class org.chromium.** { |
| 53 @**.CalledByNativeUnchecked <methods>; | 52 @org.chromium.base.annotations.CalledByNativeUnchecked <methods>; |
| 54 } | 53 } |
| 55 -keepclasseswithmembers class org.chromium.** { | 54 -keepclasseswithmembers class org.chromium.** { |
| 56 @**.JavascriptInterface <methods>; | 55 @org.chromium.base.annotations.NativeCall <methods>; |
| 57 } | 56 } |
| 58 -keepclasseswithmembers class org.chromium.** { | 57 -keepclasseswithmembers class org.chromium.** { |
| 59 @**.NativeCall <methods>; | 58 @org.chromium.base.annotations.UsedByReflection <methods>; |
| 60 } | 59 } |
| 61 -keepclasseswithmembers class org.chromium.** { | 60 -keepclasseswithmembers class org.chromium.** { |
| 62 @**.UsedByReflection <methods>; | 61 @org.chromium.base.VisibleForTesting <methods>; |
| 63 } | |
| 64 -keepclasseswithmembers class org.chromium.** { | |
| 65 @**.VisibleForTesting <methods>; | |
| 66 } | 62 } |
| 67 -keepclasseswithmembers class org.chromium.** { | 63 -keepclasseswithmembers class org.chromium.** { |
| 68 native <methods>; | 64 native <methods>; |
| 69 } | 65 } |
| 70 | 66 |
| 71 # Class merging provides negligible .dex size reduction and method count | 67 # Class merging provides negligible .dex size reduction and method count |
| 72 # reduction (about 0.3% improvement on method count, and 0.1% savings on size), | 68 # reduction (about 0.3% improvement on method count, and 0.1% savings on size), |
| 73 # and it messes up stack traces if the classes are optimized. Thus, it is in our | 69 # and it messes up stack traces if the classes are optimized. Thus, it is in our |
| 74 # best interests to turn it off. See crbug.com/620323 | 70 # best interests to turn it off. See crbug.com/620323 |
| 75 -optimizations !class/merging/* | 71 -optimizations !class/merging/* |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 217 # Needed for chrome_sync_shell_test_apk. Note - these do no affect chrome_apk's | 213 # Needed for chrome_sync_shell_test_apk. Note - these do no affect chrome_apk's |
| 218 # size. | 214 # size. |
| 219 -keep class org.chromium.sync.protocol.* { *; } | 215 -keep class org.chromium.sync.protocol.* { *; } |
| 220 | 216 |
| 221 # These resources are referenced in tests, but not in the real application. | 217 # These resources are referenced in tests, but not in the real application. |
| 222 -keepclassmembers class org.chromium.chrome.R$id { | 218 -keepclassmembers class org.chromium.chrome.R$id { |
| 223 int webapp_splash_space; | 219 int webapp_splash_space; |
| 224 int mr_chooser_list; | 220 int mr_chooser_list; |
| 225 int find_toolbar; | 221 int find_toolbar; |
| 226 } | 222 } |
| OLD | NEW |