Commit e46350b7 authored by Peter Wen's avatar Peter Wen Committed by Chromium LUCI CQ

Revert "Android: Reduce deps for prebuilts"

This reverts commit 625caaa3.

Reason for revert: Failed https://ci.chromium.org/ui/p/chromium/builders/ci/android-archive-rel/17017/overview

Original change's description:
> Android: Reduce deps for prebuilts
>
> Prebuilt jars do not need the full classpath since they are either jars
> ready to be passed to ijar, or they just need a dep on a non-java target
> to unzip the jar from its aar.
>
> Previously header jars could depend on impl jars due to passing the full
> classpath for prebuilt jars, but this should not happen as it defeats
> the purpose of header jars being fast to compile. Added a regression
> test to ensure chrome_java__header doesn't depend on base_java__impl.
>
> Bug: 1154302
> Fixed: 1154302
> Change-Id: I896490bf99bf62777c083f0766064c734484977b
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2567618
> Reviewed-by: Clark DuVall <cduvall@chromium.org>
> Commit-Queue: Clark DuVall <cduvall@chromium.org>
> Commit-Queue: Peter Wen <wnwen@chromium.org>
> Auto-Submit: Peter Wen <wnwen@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#832488}

TBR=wnwen@chromium.org,cduvall@chromium.org,chromium-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: Ib4032d0a2ee8cedf8e5f5a645d25824a1adaeda3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1154302
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2566305Reviewed-by: default avatarPeter Wen <wnwen@chromium.org>
Commit-Queue: Peter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#832500}
parent 89941bf5
......@@ -3151,12 +3151,6 @@ if (enable_java_templates) {
} else {
script = "//build/android/gyp/compile_java.py"
}
if (target_name == "chrome_java__header") {
# Regression test for: https://crbug.com/1154302
assert_no_deps = [ "//base:base_java__impl" ]
}
depfile = "$target_gen_dir/$target_name.d"
deps = _srcjar_deps
if (defined(invoker.deps)) {
......@@ -3927,7 +3921,7 @@ if (enable_java_templates) {
} # _has_sources
if (_is_prebuilt || _build_device_jar || _build_host_jar) {
_unprocessed_jar_deps = _non_java_deps
_unprocessed_jar_deps = _full_classpath_deps
if (_has_sources) {
_unprocessed_jar_deps += [ ":$_compile_java_target" ]
}
......@@ -3965,7 +3959,7 @@ if (enable_java_templates) {
"--output-jar",
rebase_path(_rewritten_jar, root_build_dir),
]
deps = _unprocessed_jar_deps + _full_classpath_deps + [
deps = _unprocessed_jar_deps + [
":$_build_config_target_name",
invoker.bytecode_rewriter_target,
]
......@@ -3984,9 +3978,11 @@ if (enable_java_templates) {
input_jar = _unprocessed_jar_path
output_jar = _final_ijar_path
# Normally ijar does not require any deps, but some prebuilts depend on
# an unzip target to extract the jar from aar files. Other prebuilts
# need bytecode rewriting before calling ijar.
# ijar does not require classpath, but must declare these as deps so
# that they are transitive deps for targets that depend on this
# target. If we can change compile & desugar steps to use direct
# interface classpath rather than full interface classpath, then this
# could just be _non_java_deps.
deps = _unprocessed_jar_deps
}
_public_deps += [ ":$_header_target_name" ]
......@@ -4003,7 +3999,7 @@ if (enable_java_templates) {
build_config = _build_config
build_config_dep = ":$_build_config_target_name"
input_jar_path = _unprocessed_jar_path
jar_deps = _unprocessed_jar_deps + _full_classpath_deps
jar_deps = _unprocessed_jar_deps
if (_build_host_jar) {
host_jar_path = _host_processed_jar_path
}
......@@ -4049,8 +4045,7 @@ if (enable_java_templates) {
_bytecode_checks_target = "${target_name}__validate_classpath"
bytecode_processor(_bytecode_checks_target) {
forward_variables_from(invoker, [ "missing_classes_allowlist" ])
deps = _unprocessed_jar_deps + _full_classpath_deps +
[ ":$_build_config_target_name" ]
deps = _unprocessed_jar_deps + [ ":$_build_config_target_name" ]
requires_android = _requires_android
target_label =
get_label_info(":${invoker.target_name}", "label_no_toolchain")
......
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