From 2919797aaaf2d3ec90ebeb510573f90c8e562310 Mon Sep 17 00:00:00 2001 From: Romain Jobredeaux Date: Mon, 30 May 2022 22:02:31 -0400 Subject: [PATCH] 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 --- android/allowlists/allowlists.go | 1 + android/bazel_handler.go | 6 ------ 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/android/allowlists/allowlists.go b/android/allowlists/allowlists.go index af82942cb..ab71d995c 100644 --- a/android/allowlists/allowlists.go +++ b/android/allowlists/allowlists.go @@ -257,6 +257,7 @@ var ( "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 3be9805be..5e8a1839e 100644 --- a/android/bazel_handler.go +++ b/android/bazel_handler.go @@ -399,12 +399,6 @@ type builtinBazelRunner struct{} 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, }