Use base_proguard_config.flags in Cronet's proguarded targets |
||
Issue descriptionIt might be beneficial to use base_proguard_config.flags instead of writing our flags in cronet/android/proguard.cfg. That way we can take advantage of the new proguard changes in base and do not need to keep everything in sync ourselves. Ideally cronet/android/proguard.cfg will only contain proguard flags specific to Cronet and net.
,
Aug 8 2016
If we use base_proguard_config.flags then we need to ensure to include them into build package, so applications that depend on Cronet would use them as well.
,
Aug 8 2016
Yep, totally agree. The CL (https://codereview.chromium.org/2214013002/) combines cronet proguard and base proguard flags into one file which is then included in cronet package.
,
Aug 18 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/761ef674d6498bad0f6c1bbdbbfcec59ffe5bafb commit 761ef674d6498bad0f6c1bbdbbfcec59ffe5bafb Author: xunjieli <xunjieli@chromium.org> Date: Thu Aug 18 13:51:58 2016 Use keepclassmembers for android.webkit.JavascriptInterface in proguard This CL uses -keepclassmembers for android.webkit.JavascriptInterface instead of -keepclasseswithmembers in proguard. The reason is because keeping methods is enough for files annotated with for android.webkit.JavascriptInterface. BUG= 634998 Review-Url: https://codereview.chromium.org/2250963004 Cr-Commit-Position: refs/heads/master@{#412818} [modify] https://crrev.com/761ef674d6498bad0f6c1bbdbbfcec59ffe5bafb/base/android/base_proguard_config.flags
,
Sep 7 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/eff981189bb608fb2125f3b514ab8a5634bc2c0a commit eff981189bb608fb2125f3b514ab8a5634bc2c0a Author: xunjieli <xunjieli@chromium.org> Date: Wed Sep 07 21:51:18 2016 [Cronet] add base proguard flags This CL pulls in base's proguard flags when compiling cronet_sample_apk and cronet_package. Cronet will not need to duplicate proguard flags and can benefit from base proguard file changes. This saves about 1882 - 1471 = 411 methods from our dex count for CronetSample.apk and 10kB(4.35%). BUG= 634998 Review-Url: https://codereview.chromium.org/2214013002 Cr-Commit-Position: refs/heads/master@{#417060} [modify] https://crrev.com/eff981189bb608fb2125f3b514ab8a5634bc2c0a/components/cronet/android/BUILD.gn [modify] https://crrev.com/eff981189bb608fb2125f3b514ab8a5634bc2c0a/components/cronet/android/proguard.cfg [modify] https://crrev.com/eff981189bb608fb2125f3b514ab8a5634bc2c0a/components/cronet/android/sample/javatests/proguard.cfg [add] https://crrev.com/eff981189bb608fb2125f3b514ab8a5634bc2c0a/components/cronet/tools/generate_proguard_file.py
,
Sep 8 2016
I checked in the CL. However, there is still some work needed to move some app-level proguard flags out of base_proguard_config.flags. The graphs tracking our Dex size is on perf dashboard logged under test suite "resource_sizes (CronetSample.apk)." Thanks to all the work done by agrieve@ and other Android folks. Using base flags gives us a 20% saving on our Dex according to the perf dashboard. https://chromeperf.appspot.com/report?sid=26f804155d6ac6e65a4ab5032217d9835ae87b93608abebb67839fef9e5d62f6&rev=417266
,
Sep 8 2016
Woo! That's great! |
||
►
Sign in to add a comment |
||
Comment 1 by xunji...@chromium.org
, Aug 5 2016