Commit 92baa450 authored by Mohamed Heikal's avatar Mohamed Heikal Committed by Commit Bot

Allow android_aar_prebuilt info files to be ignored during update

If the update_android_aar_prebuilts gn arg is set, all info files are
updated. However, some info files could actually not be part of the repo
but instead be pulled in via cipd along with the aar itself. This cl
adds a gn template flag to disable updating info files for
android_aar_prebuilt targets that specify it.

Change-Id: I5b82b8e614ab989936834a1b270c0d97bba2da3f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2353355
Commit-Queue: Mohamed Heikal <mheikal@chromium.org>
Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#797847}
parent eafc5b4c
...@@ -4099,6 +4099,9 @@ if (enable_java_templates) { ...@@ -4099,6 +4099,9 @@ if (enable_java_templates) {
# ignore_native_libraries: Whether to ignore .so files found in the .aar. # ignore_native_libraries: Whether to ignore .so files found in the .aar.
# See also extract_native_libraries. # See also extract_native_libraries.
# ignore_proguard_configs: Whether to ignore proguard configs. # ignore_proguard_configs: Whether to ignore proguard configs.
# ignore_info_updates: Whether to ignore the info file when
# update_android_aar_prebuilts gn arg is true. However, the info file
# will still be verified regardless of the value of this flag.
# strip_resources: Whether to ignore android resources found in the .aar. # strip_resources: Whether to ignore android resources found in the .aar.
# custom_package: Java package for generated R.java files. # custom_package: Java package for generated R.java files.
# extract_assets: Whether to extract and include assets found in the .aar. # extract_assets: Whether to extract and include assets found in the .aar.
...@@ -4143,9 +4146,12 @@ if (enable_java_templates) { ...@@ -4143,9 +4146,12 @@ if (enable_java_templates) {
_strip_resources = _strip_resources =
defined(invoker.strip_resources) && invoker.strip_resources defined(invoker.strip_resources) && invoker.strip_resources
_ignore_info_updates =
defined(invoker.ignore_info_updates) && invoker.ignore_info_updates
# Scan the AAR file and determine the resources and jar files. # Scan the AAR file and determine the resources and jar files.
# Some libraries might not have resources; others might have two jars. # Some libraries might not have resources; others might have two jars.
if (update_android_aar_prebuilts) { if (!_ignore_info_updates && update_android_aar_prebuilts) {
print("Writing " + rebase_path(_info_path, "//")) print("Writing " + rebase_path(_info_path, "//"))
exec_script("//build/android/gyp/aar.py", exec_script("//build/android/gyp/aar.py",
[ [
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment