Enable Java in mixed builds.
Allowlist manual BUILD files in prebuilts/bazel for
the toolchain setup.
Test: b build build/bazel/examples/java/...
Change-Id: Id649dce631731e5396da4a9fe224e33f8949dd7d
Bug: 196441639
diff --git a/android/allowlists/allowlists.go b/android/allowlists/allowlists.go
index af82942..ab71d99 100644
--- a/android/allowlists/allowlists.go
+++ b/android/allowlists/allowlists.go
@@ -257,6 +257,7 @@
"packages/apps/QuickSearchBox":/* recursive = */ true,
"packages/apps/WallpaperPicker":/* recursive = */ false,
+ "prebuilts/bazel":/* recursive = */ true,
"prebuilts/bundletool":/* recursive = */ true,
"prebuilts/gcc":/* recursive = */ true,
"prebuilts/build-tools":/* recursive = */ true,
diff --git a/android/bazel_handler.go b/android/bazel_handler.go
index 3be9805..5e8a183 100644
--- a/android/bazel_handler.go
+++ b/android/bazel_handler.go
@@ -399,12 +399,6 @@
func (r *builtinBazelRunner) issueBazelCommand(paths *bazelPaths, runName bazel.RunName, command bazelCommand,
extraFlags ...string) (string, string, error) {
cmdFlags := []string{
- // --noautodetect_server_javabase has the practical consequence of preventing Bazel from
- // attempting to download rules_java, which is incompatible with
- // --experimental_repository_disable_download set further below.
- // rules_java is also not needed until mixed builds start building java targets.
- // TODO(b/197958133): Once rules_java is pulled into AOSP, remove this flag.
- "--noautodetect_server_javabase",
"--output_base=" + absolutePath(paths.outputBase),
command.command,
}