Commit 911c0aaf authored by Sam Maier's avatar Sam Maier Committed by Commit Bot

Removing extract_assets from android_aar_prebuilt

This is unused, and now that we have an expectations file this should still
be easy enough to audit.

Change-Id: Ic48e76ed4e1b90e351c27a350cf82d3f6b0fea6d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2380576
Auto-Submit: Sam Maier <smaier@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#802443}
parent 54d7529c
...@@ -4112,9 +4112,6 @@ if (enable_java_templates) { ...@@ -4112,9 +4112,6 @@ if (enable_java_templates) {
# will still be verified regardless of the value of this flag. # 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.
# If the file contains assets, either extract_assets or ignore_assets
# must be set.
# extract_native_libraries: Whether to extract .so files found in the .aar. # extract_native_libraries: Whether to extract .so files found in the .aar.
# If the file contains .so, either extract_native_libraries or # If the file contains .so, either extract_native_libraries or
# ignore_native_libraries must be set. # ignore_native_libraries must be set.
...@@ -4142,7 +4139,6 @@ if (enable_java_templates) { ...@@ -4142,7 +4139,6 @@ if (enable_java_templates) {
_unpack_target_name = "${_target_name_without_java_or_junit}__unpack_aar" _unpack_target_name = "${_target_name_without_java_or_junit}__unpack_aar"
_ignore_aidl = defined(invoker.ignore_aidl) && invoker.ignore_aidl _ignore_aidl = defined(invoker.ignore_aidl) && invoker.ignore_aidl
_ignore_assets = defined(invoker.ignore_assets) && invoker.ignore_assets _ignore_assets = defined(invoker.ignore_assets) && invoker.ignore_assets
_extract_assets = defined(invoker.extract_assets) && invoker.extract_assets
_ignore_manifest = _ignore_manifest =
defined(invoker.ignore_manifest) && invoker.ignore_manifest defined(invoker.ignore_manifest) && invoker.ignore_manifest
_ignore_native_libraries = defined(invoker.ignore_native_libraries) && _ignore_native_libraries = defined(invoker.ignore_native_libraries) &&
...@@ -4176,7 +4172,7 @@ if (enable_java_templates) { ...@@ -4176,7 +4172,7 @@ if (enable_java_templates) {
# rm -r out/tmp # rm -r out/tmp
_scanned_files = read_file(_info_path, "scope") _scanned_files = read_file(_info_path, "scope")
_contains_scanned_assets = _scanned_files.assets != [] _use_scanned_assets = !_ignore_assets && _scanned_files.assets != []
assert(_ignore_aidl || _scanned_files.aidl == [], assert(_ignore_aidl || _scanned_files.aidl == [],
"android_aar_prebuilt() aidl not yet supported." + "android_aar_prebuilt() aidl not yet supported." +
...@@ -4190,11 +4186,6 @@ if (enable_java_templates) { ...@@ -4190,11 +4186,6 @@ if (enable_java_templates) {
assert( assert(
!(_ignore_native_libraries && _extract_native_libraries), !(_ignore_native_libraries && _extract_native_libraries),
"ignore_native_libraries and extract_native_libraries cannot both be set.") "ignore_native_libraries and extract_native_libraries cannot both be set.")
assert(!_contains_scanned_assets || (_ignore_assets || _extract_assets),
"android_aar_prebuilt() contains asset files." +
" Please set ignore_assets or extract_assets.")
assert(!(_ignore_assets && _extract_assets),
"ignore_assets and extract_assets cannot both be set.")
assert(!_scanned_files.has_native_libraries || assert(!_scanned_files.has_native_libraries ||
_scanned_files.native_libraries != []) _scanned_files.native_libraries != [])
assert(_scanned_files.has_classes_jar || _scanned_files.subjars == []) assert(_scanned_files.has_classes_jar || _scanned_files.subjars == [])
...@@ -4252,7 +4243,7 @@ if (enable_java_templates) { ...@@ -4252,7 +4243,7 @@ if (enable_java_templates) {
rebase_path(_scanned_files.native_libraries, "", _output_path), rebase_path(_scanned_files.native_libraries, "", _output_path),
"abspath") "abspath")
} }
if (_extract_assets && _contains_scanned_assets) { if (_use_scanned_assets) {
outputs += outputs +=
get_path_info(rebase_path(_scanned_files.assets, "", _output_path), get_path_info(rebase_path(_scanned_files.assets, "", _output_path),
"abspath") "abspath")
...@@ -4310,10 +4301,8 @@ if (enable_java_templates) { ...@@ -4310,10 +4301,8 @@ if (enable_java_templates) {
not_needed(invoker, [ "strip_drawables" ]) not_needed(invoker, [ "strip_drawables" ])
} }
_should_extract_assets = _extract_assets && _contains_scanned_assets
# Create the android_assets target for assets # Create the android_assets target for assets
if (_should_extract_assets) { if (_use_scanned_assets) {
_assets_target_name = "${target_name}__assets" _assets_target_name = "${target_name}__assets"
android_assets(_assets_target_name) { android_assets(_assets_target_name) {
forward_variables_from(invoker, [ "testonly" ]) forward_variables_from(invoker, [ "testonly" ])
......
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