commit | b9a9abdb6b670cb87f5245d03973f9896b1fa9c6 | [log] [tgz] |
---|---|---|
author | David 'Digit' Turner <digit@google.com> | Thu May 17 15:36:35 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Thu May 17 15:36:35 2018 |
tree | ec5acb65a6eea05e6561d7ac7655190549e219a3 | |
parent | b148b4788bc90804d3848878db99aff8167c5096 [diff] |
android: build: Support compiling resources in protobuf format. Android dynamic app bundle generation requires compiling the resources into a new format based on serialized protocol buffers, instead of the existing binary xml + resources.arsc file. This is performed through an updated (and yet unreleased) version of the 'aapt2 compile' command that takes a new --proto-format command-line option to specify the output format. This CL modifies the build system to support these, in the following way: - compile_resources.py now supports a --proto-format option that can be used to specify the output format of the generated file. - The new GN build var android_sdk_app_bundle_build_tools can be used in your args.gn file the path of an updated Android SDK build-tools/<version>/ directory that contains the updated 'aapt2' binary. There is also a global android_enable_app_bundles global boolean, which is set to true when said build tools path is set. - The android_apk() GN template can also define a new target (${target_name}__compile_proto_resources) used to compile the APK's resources set into the new format. Note that the output is put under $CHROMIUM_OUTPUT_DIR/gen/proto_resources/$APK_NAME.proto.ap_ While the existing one is put under $CHROMIUM_OUTPUT_DIR/gen/arsc/$APK_NAME.ap_ IMPORTANT NOTE: The APK target itself does not depend on this .proto.ap_ file, but a future CL will introduce new targets for app bundles, which will depend on the APK target, and use it to depend on it. - The APK's .build_config file now includes a new deps_info['proto_resources_path'] that points to the proto-compiled resources file. This will be used by app bundles that depend on the APK itself to define a bundle module. The value can be specified by using --apk-proto-resources when using write_build_config.py BUG=820459 R=agrieve@chromium.org, yfriedman@chromium.org, trevordixon@chromium.org Change-Id: I1765a3d7818397a0400466ab7f8e02cf882b8927 Reviewed-on: https://chromium-review.googlesource.com/1047607 Commit-Queue: David Turner <digit@chromium.org> Reviewed-by: agrieve <agrieve@chromium.org> Reviewed-by: Yaron Friedman <yfriedman@chromium.org> Cr-Commit-Position: refs/heads/master@{#559542}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .