Commit 7fcb0102 authored by Andrew Grieve's avatar Andrew Grieve Committed by Commit Bot

Android: Remove $out/resource_zips directory

Special top-level directory no long necessary now that we use binary
resources in robolectric tests.

Bug: 963624
Change-Id: I7330001028df10025ba0e11b310d9df586f7b9e3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1984477Reviewed-by: default avatarSam Maier <smaier@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#728527}
parent 70abc6e6
......@@ -1870,19 +1870,16 @@ if (enable_java_templates) {
# variables and an onResourcesLoaded() method.
#
# Output variables:
# zip_path: (optional)
# resources_zip:
# Path to a .resources.zip that will simply contain all the
# input resources, collected in a single archive.
#
# r_text_out_path: (optional): Path for the generated R.txt file.
# r_text_out_path: Path for the generated R.txt file.
#
# srcjar_path: (optional) Path to a generated .srcjar containing the
# generated R.java source file.
#
template("prepare_resources") {
if (defined(invoker.srcjar_path)) {
_srcjar_path = invoker.srcjar_path
}
action_with_pydeps(target_name) {
set_sources_assignment_filter([])
forward_variables_from(invoker,
......@@ -1895,7 +1892,11 @@ if (enable_java_templates) {
script = "//build/android/gyp/prepare_resources.py"
depfile = "$target_gen_dir/${invoker.target_name}.d"
outputs = []
outputs = [
invoker.resources_zip,
invoker.resources_zip + ".info",
invoker.r_text_out_path,
]
_android_aapt_path = android_default_aapt_path
......@@ -1919,6 +1920,10 @@ if (enable_java_templates) {
"--extra-res-packages=@FileArg($_rebased_build_config:deps_info:extra_package_names)",
"--extra-r-text-files=@FileArg($_rebased_build_config:deps_info:extra_r_text_files)",
"--res-sources-path=$_rebased_res_sources_path",
"--resource-zip-out",
rebase_path(invoker.resources_zip, root_build_dir),
"--r-text-out",
rebase_path(invoker.r_text_out_path, root_build_dir),
]
if (defined(invoker.android_manifest)) {
......@@ -1932,30 +1937,11 @@ if (enable_java_templates) {
]
}
if (defined(invoker.zip_path)) {
outputs += [
invoker.zip_path,
invoker.zip_path + ".info",
]
args += [
"--resource-zip-out",
rebase_path(invoker.zip_path, root_build_dir),
]
}
if (defined(invoker.r_text_out_path)) {
outputs += [ invoker.r_text_out_path ]
args += [
"--r-text-out",
rebase_path(invoker.r_text_out_path, root_build_dir),
]
}
if (defined(_srcjar_path)) {
outputs += [ _srcjar_path ]
if (defined(invoker.srcjar_path)) {
outputs += [ invoker.srcjar_path ]
args += [
"--srcjar-out",
rebase_path(_srcjar_path, root_build_dir),
rebase_path(invoker.srcjar_path, root_build_dir),
]
}
......
......@@ -839,11 +839,7 @@ if (enable_java_templates) {
# variables = ["color=red"]
# }
template("jinja_template_resources") {
# JUnit tests use resource zip files. These must not be put in gen/
# directory or they will not be available to tester bots.
_resources_zip_rebased_path = rebase_path(target_gen_dir, root_gen_dir)
_resources_zip = "${root_out_dir}/resource_zips/${_resources_zip_rebased_path}/${target_name}.resources.zip"
_resources_zip = "$target_out_dir/${target_name}.resources.zip"
_generating_target_name = "${target_name}__template"
action_with_pydeps(_generating_target_name) {
......@@ -941,10 +937,7 @@ if (enable_java_templates) {
_pass_resource_files = defined(invoker.sources)
_res_sources_path = "$target_gen_dir/${invoker.target_name}.res.sources"
# JUnit tests use resource zip files. These must not be put in gen/
# directory or they will not be available to tester bots.
_resources_zip_rebased_path = rebase_path(target_gen_dir, root_gen_dir)
_zip_path = "${root_out_dir}/resource_zips/${_resources_zip_rebased_path}/${target_name}.resources.zip"
_resources_zip = "$target_out_dir/$target_name.resources.zip"
_r_text_out_path = _base_path + "_R.txt"
_build_config = _base_path + ".build_config"
_build_config_target_name = "$target_name$build_config_target_suffix"
......@@ -986,7 +979,7 @@ if (enable_java_templates) {
write_build_config(_build_config_target_name) {
type = "android_resources"
build_config = _build_config
resources_zip = _zip_path
resources_zip = _resources_zip
res_sources_path = _res_sources_path
if (defined(_srcjar_path)) {
......@@ -1027,7 +1020,7 @@ if (enable_java_templates) {
sources = _resource_files
build_config = _build_config
zip_path = _zip_path
resources_zip = _resources_zip
r_text_out_path = _r_text_out_path
if (defined(invoker.r_text_file)) {
......@@ -1184,11 +1177,7 @@ if (enable_java_templates) {
template("java_strings_grd") {
forward_variables_from(invoker, [ "testonly" ])
# JUnit tests use resource zip files. These must not be put in gen/
# directory or they will not be available to tester bots.
_resources_zip_rebased_path = rebase_path(target_gen_dir, root_gen_dir)
_resources_zip = "${root_out_dir}/resource_zips/${_resources_zip_rebased_path}/${target_name}.resources.zip"
_resources_zip = "$target_out_dir/$target_name.resources.zip"
_grit_target_name = "${target_name}__grit"
_grit_output_dir = "$target_gen_dir/${target_name}_grit_output"
......@@ -1249,11 +1238,7 @@ if (enable_java_templates) {
template("java_strings_grd_prebuilt") {
forward_variables_from(invoker, [ "testonly" ])
# JUnit tests use resource zip files. These must not be put in gen/
# directory or they will not be available to tester bots.
_resources_zip_rebased_path = rebase_path(target_gen_dir, root_gen_dir)
_resources_zip = "${root_out_dir}/resource_zips/${_resources_zip_rebased_path}/${target_name}.resources.zip"
_resources_zip = "$target_out_dir/$target_name.resources.zip"
_zip_target_name = "${target_name}__zip"
zip(_zip_target_name) {
......
......@@ -47,7 +47,9 @@ copy_ex("copy_extra_files_to_upload_dir") {
renaming_sources += [ generate_new_style_manifest_for_upload_output ]
renaming_destinations += [ "new_style_AndroidManifest.xml" ]
renaming_sources += [ "${root_out_dir}/resource_zips/chrome/android/webapk/shell_apk/webapk_strings_grd.resources.zip" ]
_strings_target = "//chrome/android/webapk/shell_apk:webapk_strings_grd"
_target_out_dir = get_label_info(_strings_target, "target_out_dir")
renaming_sources += [ "$_target_out_dir/webapk_strings_grd.resources.zip" ]
renaming_destinations += [ "res/strings.zip" ]
deps = [
......
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