LGTM On Tue, May 5, 2015 at 5:12 PM Huo, Halton <[email protected]> wrote:
> Kenneth, > > > > Could you review this intent? > > > > Thanks, > > Halton. > > *From:* Crosswalk-dev [mailto: > [email protected]] *On Behalf Of *Huo, > Halton > *Sent:* Tuesday, April 07, 2015 2:48 PM > *To:* He, Ke; [email protected] > *Subject:* Re: [Crosswalk-dev] Intent to Implement: Enable proguard for > crosswalk to compress apk size > > > > Lgtm, looking forward this change get in. > > > > *From:* Crosswalk-dev [ > mailto:[email protected] > <[email protected]>] *On Behalf Of *He, Ke > *Sent:* Wednesday, April 01, 2015 6:37 PM > *To:* [email protected] > *Subject:* [Crosswalk-dev] Intent to Implement: Enable proguard for > crosswalk to compress apk size > > > > > > *Description*: > > It is meaningful to compress the apk size which is built by crosswalk sdk. > Proguard is a tool which can do shrink and obfuscate operations on the java > class bytecode files. Those shrink and obfuscate operations on crosswalk > jar libraries can minimize the final apk size. Note that the purpose of > obfuscating is to compress jar size instead of preventing de-compilation. > Crosswalk jars are in package org.xwalk.* and org.chromium.*. Since we > generate wrapper and bridge layer and use the reflection mechanism to > separate core and core.internal layer, and there are much hard code > reference on method and class name when using reflection, so we don’t > shrink or obfuscate classes in package org.xwalk.* > > > > *Affected component*: > > Make_apk.py, proguard config file, document > > > > *Related feature*: > > Enable proguard for crosswalk to compress apk size. > > JIRA: https://crosswalk-project.org/jira/browse/XWALK-3854 > > > > *Target release*: > > Crosswalk-14 > > > > *Implementation details*: > > 1. The proguard library is included in android-sdk/tools/. And it > can be easily enabled by change the project.property file in android > application project. The default android build.xml for ant has the > obfuscate target which supports proguard. > > 2. Create proguard config files, add the rules like keep xwalk > classes, keep JNI and calledbyNative functions. Add the proguard config > file in xwalk/template, which will be delivered together with the xwalk sdk. > > 3. Enable proguard by modifying the gyp file of instrumentation > test project, make sure test cases for embedded mode can all pass. > > 4. Modify make_apk.py, add a new build flag --enable-proguard > option, by default it is disabled. It only works with embedded mode. Copy > the proguard dumping and mapping files for user. > > 5. Update crosswalk wiki for users who want embedding API, attach the > proguard config list and a guide how to enable proguard. > > > > > > Best Regards > > He,Ke > > > > > _______________________________________________ > Crosswalk-dev mailing list > [email protected] > https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-dev >
_______________________________________________ Crosswalk-dev mailing list [email protected] https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-dev
