Android: Depend on build_java explicitly
This CL moves build_java from being a public_dep of base_java to a
regular dep. This means other targets that need to depend on build_java
must do so explicitly. Since build_java and base_java are not closely
related, this de-coupling (and when jni annotations are similarly moved)
will reduce the number of targets that depend on base_java only for its
annotations, thus speeding up builds when making changes to base_java.
By using dep_operations.py, this CL avoided adding build_java to 224+
targets that already depended on base_java across 194 files. There are
more opportunities to remove unnecessary dependencies on build_java, but
that is left for future CLs in order to prioritize removing build_java
from base_java's public_deps.
Initial estimate (after jni_java is similarly moved out of public_deps)
is that we can remove more than 265+ dependencies on base_java across
~153 files.
Bug: 1038372
Change-Id: Ia5acc70af449f10363bd7e123473e0823ce31bb1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3606468
Reviewed-by: Mohamed Heikal <mheikal@chromium.org>
Commit-Queue: Peter Wen <wnwen@chromium.org>
Owners-Override: Peter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/main@{#996885}
NOKEYCHECK=True
GitOrigin-RevId: 494cdd47f9446588db75588b8f2f266d66beb786
diff --git a/BUILD.gn b/BUILD.gn
index abefcea..9e9aef0 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -50,6 +50,7 @@
android_library("midi_java") {
deps = [
"//base:base_java",
+ "//build/android:build_java",
"//third_party/androidx:androidx_annotation_annotation_java",
]
annotation_processor_deps = [ "//base/android/jni_generator:jni_processor" ]