Commit c961f8a8 authored by Vasiliy Telezhnikov's avatar Vasiliy Telezhnikov Committed by Commit Bot

Build: remove resource_dirs support

This CL removes resource_dirs support from android_resources, it was
deprecated in favour of sources.

Details:
https://crbug.com/1026378
https://groups.google.com/a/chromium.org/forum/#!msg/chromium-dev/KAFsfaoq7y4/OC4v5sb9BQAJ

Bug: 1062263
Change-Id: I5063b0b5c6d45a5e860901e27a66d6a503a1fbf4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2136036Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
Commit-Queue: Vasiliy Telezhnikov <vasilyt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#756711}
parent 8c9e1068
...@@ -875,12 +875,12 @@ if (enable_java_templates) { ...@@ -875,12 +875,12 @@ if (enable_java_templates) {
# own dependencies. # own dependencies.
# #
# Variables # Variables
# sources: List of resource files for this target.
# deps: Specifies the dependencies of this target. Any Android resources # deps: Specifies the dependencies of this target. Any Android resources
# listed in deps will be included by libraries/apks that depend on this # listed in deps will be included by libraries/apks that depend on this
# target. # target.
# alternative_android_sdk_dep: Optional. Alternative Android system # alternative_android_sdk_dep: Optional. Alternative Android system
# android java target to use. # android java target to use.
# resource_dirs: List of directories containing resources for this target.
# android_manifest: AndroidManifest.xml for this target (optional). Will be # android_manifest: AndroidManifest.xml for this target (optional). Will be
# merged into apks that directly or indirectly depend on this target. # merged into apks that directly or indirectly depend on this target.
# android_manifest_dep: Target that generates AndroidManifest (if applicable) # android_manifest_dep: Target that generates AndroidManifest (if applicable)
...@@ -918,7 +918,10 @@ if (enable_java_templates) { ...@@ -918,7 +918,10 @@ if (enable_java_templates) {
not_needed(invoker, [ "v14_skip" ]) not_needed(invoker, [ "v14_skip" ])
} }
_pass_resource_files = defined(invoker.sources) assert(!defined(invoker.resource_dirs),
"resource_dirs in android_resources is deprecated. Please use " +
"sources=[] and list resource files instead. Details: " +
"https://crbug.com/1026378")
_res_sources_path = "$target_gen_dir/${invoker.target_name}.res.sources" _res_sources_path = "$target_gen_dir/${invoker.target_name}.res.sources"
_resources_zip = "$target_out_dir/$target_name.resources.zip" _resources_zip = "$target_out_dir/$target_name.resources.zip"
...@@ -941,19 +944,11 @@ if (enable_java_templates) { ...@@ -941,19 +944,11 @@ if (enable_java_templates) {
_deps += [ "//third_party/android_sdk:android_sdk_java" ] _deps += [ "//third_party/android_sdk:android_sdk_java" ]
} }
if (_pass_resource_files) { _resource_files = []
_resource_files = invoker.sources if (defined(invoker.sources)) {
} else { _resource_files += invoker.sources
_sources_build_rel = []
if (invoker.resource_dirs != []) {
_sources_build_rel +=
exec_script("//build/android/gyp/find.py",
rebase_path(invoker.resource_dirs, root_build_dir),
"list lines")
}
_resource_files = rebase_path(_sources_build_rel, ".", root_build_dir)
} }
_rebased_resource_files = rebase_path(_resource_files, root_build_dir) _rebased_resource_files = rebase_path(_resource_files, root_build_dir)
write_file(_res_sources_path, _rebased_resource_files) write_file(_res_sources_path, _rebased_resource_files)
......
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