Commit fa8a0cf7 authored by Andrew Grieve's avatar Andrew Grieve Committed by Chromium LUCI CQ

Android: Remove obsolete .build_config entry "owned_resource_srcjars"

Hasn't been used since we switched to per-library R.java generation.
Confirmed locally that all of my .build_config files had empty lists for
the value.

Bug: 1073476
Change-Id: I7b49ffda929591c7f3c8fdbe3dcffe30021bf00b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2606516
Auto-Submit: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Mohamed Heikal <mheikal@chromium.org>
Reviewed-by: default avatarMohamed Heikal <mheikal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#839761}
parent e3580edd
......@@ -298,10 +298,6 @@ dependencies of this target. Excludes resources owned by non-chromium code.
List of all resource zip files belonging to all transitive resource dependencies
of this target. Excludes resources owned by non-chromium code.
* `deps_info['owned_resource_srcjars']`:
List of all .srcjar files belonging to all *direct* resource dependencies (i.e.
without another java_library in the dependency path) for this target.
* `deps_info['javac']`:
A dictionary containing information about the way the sources in this library
are compiled. Appears also on other Java-related targets. See the [dedicated
......@@ -1428,33 +1424,16 @@ def main(argv):
if options.res_sources_path:
deps_info['res_sources_path'] = options.res_sources_path
if options.requires_android and is_java_target:
owned_resource_srcjars = set()
for c in all_resources_deps:
srcjar = c.get('srcjar')
if srcjar:
owned_resource_srcjars.add(srcjar)
for c in all_library_deps:
if c['requires_android'] and not c['is_prebuilt']:
# Many .aar files include R.class files in them, as it makes it easier
# for IDEs to resolve symbols. However, including them is not required
# and not all prebuilts do. Rather than try to detect their presense,
# just assume they are not there. The only consequence is redundant
# compilation of the R.class.
owned_resource_srcjars.difference_update(c['owned_resource_srcjars'])
deps_info['owned_resource_srcjars'] = sorted(owned_resource_srcjars)
if options.type == 'java_library':
# Used to strip out R.class for android_prebuilt()s.
config['javac']['resource_packages'] = [
c['package_name'] for c in all_resources_deps if 'package_name' in c
]
if options.package_name:
deps_info['package_name'] = options.package_name
if options.requires_android and options.type == 'java_library':
# Used to strip out R.class for android_prebuilt()s.
config['javac']['resource_packages'] = [
c['package_name'] for c in all_resources_deps if 'package_name' in c
]
if options.package_name:
deps_info['package_name'] = options.package_name
if options.type in ('android_resources', 'android_apk', 'junit_binary',
'dist_aar', 'android_app_bundle_module', 'java_library'):
dependency_zips = []
dependency_zip_overlays = []
for c in all_resources_deps:
......
......@@ -3088,7 +3088,6 @@ if (enable_java_templates) {
# java_files: Optional list of Java source file paths.
# srcjar_deps: Optional list of .srcjar dependencies (not file paths).
# The corresponding source files they contain will be compiled too.
# srcjar_filearg: Optional @FileArg for additional srcjars.
# java_sources_file: Optional path to file containing list of Java source
# file paths. This must always be provided if java_files is not empty
# and must match it exactly.
......@@ -3254,9 +3253,6 @@ if (enable_java_templates) {
if (enable_kythe_annotations && !invoker.enable_errorprone) {
args += [ "--enable-kythe-annotations" ]
}
if (defined(invoker.srcjar_filearg)) {
args += [ "--java-srcjars=${invoker.srcjar_filearg}" ]
}
if (invoker.requires_android) {
args += [ "--bootclasspath=@FileArg($_rebased_build_config:android:sdk_interface_jars)" ]
}
......@@ -3839,10 +3835,6 @@ if (enable_java_templates) {
_uses_fake_rjava = _type == "java_library" && _requires_android
# android_apk and junit_binary pass real R.java srcjars via
# srcjar_deps. Other targets, that do not define resources_package,
# will use the owned_resource_srcjars of their android_resources
# dependencies instead.
if (_uses_fake_rjava && defined(_resources_package)) {
# has _resources at the end so it looks like a resources pattern, since
# it does act like one (and other resources patterns need to depend on
......@@ -3889,15 +3881,6 @@ if (enable_java_templates) {
deps = []
}
deps += _classpath_deps
# android_apk and junit_binary pass real R.java srcjars via
# srcjar_deps. Other targets that do not define resources_package
# will use the owned_resource_srcjars of their android_resources
# dependencies instead.
if (_uses_fake_rjava && !defined(_resources_package)) {
_rebased_build_config = rebase_path(_build_config, root_build_dir)
srcjar_filearg = "@FileArg($_rebased_build_config:deps_info:owned_resource_srcjars)"
}
}
}
_compile_java_forward_variables = [
......
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