Commit 349aba7e authored by Andrew Grieve's avatar Andrew Grieve Committed by Commit Bot

Revert "Android: Use direct deps for cronet and modules"

This reverts commit 660b5933.

Reason for revert: Broke android-archive-rel
https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8874020961794812528/+/steps/compile/0/stdout

Original change's description:
> Android: Use direct deps for cronet and modules
> 
> Remove allowlist for bypassing turbine direct deps since the last items
> in the allowlist (cronet and modules) have been removed.
> 
> Bundle feature modules require the base module in their classpath.
> Previously they were able to get by since the base module was added to
> their transitive classpath, but the base module should be in their
> direct classpath as it is used directly in R.java via inheritance.
> 
> Fixed: 1082904
> Bug: 1082904
> Change-Id: I75d89815de894c64581b98e35243aca5bc8d4e93
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2314757
> Commit-Queue: Andrew Grieve <agrieve@chromium.org>
> Reviewed-by: Andrew Grieve <agrieve@chromium.org>
> Auto-Submit: Peter Wen <wnwen@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#791117}

TBR=wnwen@chromium.org,agrieve@chromium.org

Change-Id: Iac0700e90845d2e1b85ed860abbff4c6c942df42
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1082904
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2315009Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#791126}
parent de1ae107
......@@ -1469,10 +1469,6 @@ def main(argv):
base_module_build_config['deps_info']['interface_jar_path'])
jetified_full_jar_classpath.add(
base_module_build_config['deps_info']['jetified_jar_path'])
# Turbine now compiles headers against only the direct classpath, so the
# base module's interface jar must be on the direct interface classpath.
javac_interface_classpath.add(
base_module_build_config['deps_info']['interface_jar_path'])
for dep in direct_group_deps:
if 'extra_classpath_jars' in dep:
......
......@@ -3091,7 +3091,19 @@ if (enable_java_templates) {
]
}
if (invoker.use_turbine) {
# Temporarily allow a list of directories to bypass turbine direct deps.
# TODO(crbug.com/1082904): Remove every entry in this allowlist.
_allow_transitive_interfaces =
filter_exclude(
[ get_label_info(":$target_name", "label_no_toolchain") ],
[
"//components/cronet*",
# This is due to the "special group" bypass.
"*_bundle_module__java__header",
]) == []
if (invoker.use_turbine && !_allow_transitive_interfaces) {
# Prefer direct deps for turbine as much as possible.
args += [ "--classpath=@FileArg($_rebased_build_config:javac:interface_classpath)" ]
} else {
......
......@@ -2736,6 +2736,15 @@ if (enable_java_templates) {
_java_target = "${_template_name}__java"
# Included special group to bypass looking for __java__build_config file
# for base module. Build config for base_module does not include the __java
# (eg. monochrome_public_bundle__base_bundle_module__build_config)
# and thus, this workaround skips looking for one.
if (defined(invoker.base_module_target)) {
group("${_template_name}__group") {
deps = [ "${invoker.base_module_target}__java" ]
}
}
java_library_impl(_java_target) {
forward_variables_from(invoker,
[
......@@ -2772,6 +2781,10 @@ if (enable_java_templates) {
type = "android_app_bundle_module"
res_size_info_path = _res_size_info_path
is_base_module = _is_base_module
if (!is_base_module && defined(invoker.base_module_target)) {
deps += [ ":${_template_name}__group" ]
}
} else {
type = "android_apk"
}
......
......@@ -346,7 +346,6 @@ android_library("cronet_impl_fake_base_java") {
":cronet_api_java",
":cronet_impl_common_base_java",
":cronet_impl_java_util_java",
"//third_party/android_deps:androidx_annotation_annotation_java",
]
}
......@@ -376,10 +375,7 @@ android_library("cronet_urlconnection_impl_java") {
"java/src/org/chromium/net/urlconnection/CronetURLStreamHandlerFactory.java",
"java/src/org/chromium/net/urlconnection/MessageLoop.java",
]
deps = [
":cronet_api_java",
"//third_party/android_deps:androidx_annotation_annotation_java",
]
deps = [ ":cronet_api_java" ]
}
# cronet_impl_native_base_java.jar - native implementation of the Cronet engine.
......@@ -485,8 +481,8 @@ action("cronet_combine_proguard_flags") {
"//base/android/proguard/chromium_code.flags",
# Massage the proguard to avoid incompatibilities when building internally.
"//components/cronet/android/cronet_impl_native_proguard.cfg",
"//components/cronet/android/cronet_workaround.patch",
"//components/cronet/android/cronet_impl_native_proguard.cfg",
]
outputs = [ "$target_gen_dir/cronet_impl_native_proguard.cfg" ]
args = [ "--output-file" ] + rebase_path(outputs, root_build_dir) +
......@@ -939,7 +935,6 @@ if (!is_component_build) {
":cronet_impl_fake_base_java",
":cronet_impl_platform_base_java",
"//base:base_java_test_support",
"//third_party/android_deps:androidx_test_runner_java",
"//third_party/android_sdk:android_test_base_java",
"//third_party/android_support_test_runner:runner_java",
"//third_party/junit",
......@@ -1008,7 +1003,6 @@ if (!is_component_build) {
":cronet_api_java",
":cronet_impl_all_java",
":cronet_urlconnection_impl_java",
"//third_party/android_deps:androidx_test_runner_java",
"//third_party/android_sdk:android_test_base_java",
"//third_party/android_support_test_runner:runner_java",
"//third_party/hamcrest:hamcrest_core_java",
......@@ -1044,7 +1038,6 @@ if (!is_component_build) {
"//base:base_java_test_support",
"//net/android:net_java",
"//net/android:net_java_test_support",
"//third_party/android_deps:androidx_test_runner_java",
"//third_party/android_sdk:android_test_base_java",
"//third_party/android_sdk:android_test_mock_java",
"//third_party/android_support_test_runner:runner_java",
......@@ -1096,7 +1089,6 @@ if (!is_component_build) {
":cronet_impl_platform_base_java",
":cronet_smoketests_platform_only_apk_resources",
"//base:base_java_test_support",
"//third_party/android_deps:androidx_test_runner_java",
"//third_party/android_sdk:android_test_base_java",
"//third_party/android_sdk:android_test_mock_java",
"//third_party/android_support_test_runner:runner_java",
......@@ -1131,7 +1123,6 @@ if (!is_component_build) {
":cronet_test_apk_resources",
"//base:base_java",
"//base:base_java_test_support",
"//third_party/android_deps:androidx_test_runner_java",
"//third_party/android_sdk:android_test_base_java",
"//third_party/android_sdk:android_test_mock_java",
"//third_party/android_support_test_runner:runner_java",
......
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