| OLD | NEW |
| 1 # Disable obfuscation for the following two packages. | 1 # Disable obfuscation for the following two packages. |
| 2 -keepnames,allowoptimization class com.google.android.apps.chrome.**,org.chromiu
m.** { | 2 -keepnames,allowoptimization class com.google.android.apps.chrome.**,org.chromiu
m.** { |
| 3 *; | 3 *; |
| 4 } | 4 } |
| 5 | 5 |
| 6 # The following chart was created on July 20, 2016, to decide on 3 optimization |
| 7 # passes. |
| 8 # optimization passes | time | .dex size | dirty memory per process |
| 9 # ----------------------------------------------------------------- |
| 10 # 1 | 0:48 | 5805676 | 488972 |
| 11 # 2 | 1:07 | 5777376 | 487092 |
| 12 # 3 | 1:24 | 5772192 | 486596 |
| 13 # 4 | 1:42 | 5771124 | 486484 |
| 14 # 5 | 1:56 | 5770504 | 486432 |
| 15 -optimizationpasses 3 |
| 16 |
| 17 # Class merging messes up stacktraces beyond the point of them being |
| 18 # deobfuscatable. If turned on, it would give us a 2% reduction in .dex size. |
| 19 -optimizations !class/merging/* |
| 20 |
| 21 # Allowing Proguard to change modifiers. This change shrinks the .dex size by |
| 22 # ~1.1%, and reduces the method count by ~4.3%. |
| 23 -allowaccessmodification |
| 24 |
| 6 # Fragments are loaded using reflection via Fragment.instantiate(Context,String) | 25 # Fragments are loaded using reflection via Fragment.instantiate(Context,String) |
| 7 # This can be improved upon - see crbug.com/622023. | 26 # This can be improved upon - see crbug.com/622023. |
| 8 -keep public class com.google.android.apps.chrome** extends android.app.Fragment | 27 -keep public class com.google.android.apps.chrome** extends android.app.Fragment |
| 9 -keep public class org.chromium** extends android.app.Fragment | 28 -keep public class org.chromium** extends android.app.Fragment |
| 10 | 29 |
| 11 # Keep protobuf code used via reflection | 30 # Keep protobuf code used via reflection |
| 12 # TODO(tonyg): Removing these -keeps results in new notes, but nothing seems to | 31 # 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 | 32 # break. This exclusion costs almost 100k of dex size so consider replacing it |
| 14 # with a -dontnote after more testing. | 33 # with a -dontnote after more testing. |
| 15 -keep class com.google.protobuf.** { | 34 -keep class com.google.protobuf.** { |
| (...skipping 26 matching lines...) Expand all Loading... |
| 42 # Don't warn about those in case this app is linking against an older | 61 # 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. | 62 # platform version. We know about them, and they are safe. |
| 44 -dontwarn android.support.** | 63 -dontwarn android.support.** |
| 45 | 64 |
| 46 # Proguard mistakenly optimizes away some null checks on final fields | 65 # Proguard mistakenly optimizes away some null checks on final fields |
| 47 # in the support library. | 66 # in the support library. |
| 48 # See https://sourceforge.net/p/proguard/bugs/531/#fdc9/41e2 | 67 # See https://sourceforge.net/p/proguard/bugs/531/#fdc9/41e2 |
| 49 -keepclassmembers,allowshrinking,allowobfuscation class android.support.v7.widge
t.AppCompatButton { | 68 -keepclassmembers,allowshrinking,allowobfuscation class android.support.v7.widge
t.AppCompatButton { |
| 50 !static final <fields>; | 69 !static final <fields>; |
| 51 } | 70 } |
| OLD | NEW |