Fix standalone build to use Java 21
Gerrit 3.11 plugin artifacts are built with Java 21, so we need to use
that version to consume them here.
Also ensure bzlmod is disabled since Gerrit core isn't using it yet.
Change-Id: I9e5a1a8fdf1765ecb27feab5b0b32d1fe3ea2c19
diff --git a/.bazelrc b/.bazelrc
index 6b31bc8..ade1446 100644
--- a/.bazelrc
+++ b/.bazelrc
@@ -1,7 +1,10 @@
-build --java_language_version=17
-build --java_runtime_version=remotejdk_17
-build --tool_java_language_version=17
-build --tool_java_runtime_version=remotejdk_17
+# TODO: Migrate all dependencies from WORKSPACE to MODULE.bazel
+common --noenable_bzlmod
+
+build --java_language_version=21
+build --java_runtime_version=remotejdk_21
+build --tool_java_language_version=21
+build --tool_java_runtime_version=remotejdk_21
build --workspace_status_command="python3 ./tools/workspace_status.py"
build --repository_cache=~/.gerritcodereview/bazel-cache/repository