Commit 5c7bd20f authored by Patrick Noland's avatar Patrick Noland Committed by Commit Bot

Remove un-needed generate_v14_resources script

Bug:973607

Change-Id: I2910d5608917545043f763f1e23c885af0a39ee2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1651934
Commit-Queue: Patrick Noland <pnoland@chromium.org>
Reviewed-by: default avatarJohn Budorick <jbudorick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#668539}
parent 6f1cfb69
This diff is collapsed.
......@@ -14,8 +14,6 @@ import re
import shutil
import sys
import generate_v14_compatible_resources
from util import build_utils
from util import resource_utils
......@@ -61,9 +59,7 @@ def _ParseArgs(args):
output_opts.add_argument(
'--resource-zip-out',
help='Path to a zip archive containing all resources from '
'--resource-dirs, merged into a single directory tree. This will '
'also include auto-generated v14-compatible resources unless '
'--v14-skip is used.')
'--resource-dirs, merged into a single directory tree.')
output_opts.add_argument('--srcjar-out',
help='Path to .srcjar to contain the generated R.java.')
......@@ -71,11 +67,6 @@ def _ParseArgs(args):
output_opts.add_argument('--r-text-out',
help='Path to store the generated R.txt file.')
input_opts.add_argument(
'--v14-skip',
action="store_true",
help='Do not generate nor verify v14 resources.')
input_opts.add_argument(
'--strip-drawables',
action="store_true",
......@@ -180,28 +171,14 @@ def _GenerateRTxt(options, dep_subdirs, gen_dir):
package_command, print_stdout=False, print_stderr=False)
def _GenerateResourcesZip(output_resource_zip, input_resource_dirs, v14_skip,
strip_drawables, temp_dir):
def _GenerateResourcesZip(output_resource_zip, input_resource_dirs,
strip_drawables):
"""Generate a .resources.zip file fron a list of input resource dirs.
Args:
output_resource_zip: Path to the output .resources.zip file.
input_resource_dirs: A list of input resource directories.
v14_skip: If False, then v14-compatible resource will also be
generated in |{temp_dir}/v14| and added to the final zip.
temp_dir: Path to temporary directory.
"""
if not v14_skip:
# Generate v14-compatible resources in temp_dir.
v14_dir = os.path.join(temp_dir, 'v14')
build_utils.MakeDirectory(v14_dir)
for resource_dir in input_resource_dirs:
generate_v14_compatible_resources.GenerateV14Resources(
resource_dir,
v14_dir)
input_resource_dirs.append(v14_dir)
ignore_pattern = _AAPT_IGNORE_PATTERN
if strip_drawables:
......@@ -255,8 +232,7 @@ def _OnStaleMd5(options):
if options.resource_zip_out:
_GenerateResourcesZip(options.resource_zip_out, options.resource_dirs,
options.v14_skip, options.strip_drawables,
build.temp_dir)
options.strip_drawables)
def main(args):
......@@ -277,7 +253,6 @@ def main(args):
input_strings = options.extra_res_packages + [
options.custom_package,
options.shared_resources,
options.v14_skip,
options.strip_drawables,
]
......
......@@ -22,7 +22,6 @@
../../../third_party/markupsafe/_compat.py
../../../third_party/markupsafe/_native.py
../../gn_helpers.py
generate_v14_compatible_resources.py
prepare_resources.py
util/__init__.py
util/build_utils.py
......
......@@ -1824,10 +1824,6 @@ if (enable_java_templates) {
# If true, generate an R.java file that uses non-final resource ID
# variables and an onResourcesLoaded() method.
#
# v14_skip: (optional)
# If true, skip generation of v14 compatible resources.
# (see generate_v14_compatible_resources.py for details).
#
# Output variables:
# zip_path: (optional)
# Path to a .resources.zip that will simply contain all the
......@@ -1964,10 +1960,6 @@ if (enable_java_templates) {
if (defined(invoker.shared_resources) && invoker.shared_resources) {
args += [ "--shared-resources" ]
}
if (defined(invoker.v14_skip) && invoker.v14_skip) {
args += [ "--v14-skip" ]
}
}
}
......
......@@ -889,8 +889,6 @@ if (enable_java_templates) {
# merged into apks that directly or indirectly depend on this target.
# android_manifest_dep: Target that generates AndroidManifest (if applicable)
# custom_package: java package for generated .java files.
# v14_skip: If true, don't run v14 resource generator on this. Defaults to
# false. (see build/android/gyp/generate_v14_compatible_resources.py)
# shared_resources: If true make a resource package that can be loaded by a
# different application at runtime to access the package's resources.
# r_text_file: (optional) path to pre-generated R.txt to be used when
......@@ -914,6 +912,9 @@ if (enable_java_templates) {
forward_variables_from(invoker, [ "testonly" ])
_base_path = "$target_gen_dir/$target_name"
if (defined(invoker.v14_skip)) {
not_needed(invoker, [ "v14_skip" ])
}
# JUnit tests use resource zip files. These must not be put in gen/
# directory or they will not be available to tester bots.
......@@ -977,7 +978,6 @@ if (enable_java_templates) {
"generated_resource_dirs",
"generated_resource_files",
"resource_dirs",
"v14_skip",
"strip_drawables",
])
deps = _deps
......@@ -4063,7 +4063,6 @@ if (enable_java_templates) {
if (!_strip_resources && _scanned_files.has_r_text_file) {
r_text_file = "${_output_path}/R.txt"
}
v14_skip = true
}
} else if (defined(invoker.strip_drawables)) {
not_needed(invoker, [ "strip_drawables" ])
......
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