aboutsummaryrefslogtreecommitdiffstats
path: root/WORKSPACE
diff options
context:
space:
mode:
authorDavid Ostrovsky <david@ostrovsky.org>2021-12-24 07:43:48 +0100
committerDavid Ostrovsky <d.ostrovsky@gmx.de>2022-01-20 06:40:51 -0400
commitbe732c16ab1834162ed1c215a695c8b1486add9a (patch)
treef4ee6e0fc8caae0198c8b89af638830e477aa0ad /WORKSPACE
parentc812947962103c427a202f6df38d23e1088007f1 (diff)
downloadjgit-be732c16ab1834162ed1c215a695c8b1486add9a.tar.gz
jgit-be732c16ab1834162ed1c215a695c8b1486add9a.zip
Bazel: Switch to using toolchain resolution for java rules
Bump Bazel version to release 5.0.0. In this new Bazel release, --incompatible_use_toolchain_resolution_for_java_rules is flipped, that means that the build must be adapted to toolchain resolution. Specification toolchain resolution for java rules is here: [1]. Main tracking Bazel issue is here: [2]. Given that new Bazel release also added support for remote JDK 17, add experimental support for building with remote JDK 17 to produce major byte code version 61. Test Plan: To build with remote JDK 11 run: $ bazel build :all To build with remote JDK 17 run: $ bazel build --config java17 :all [1] https://docs.google.com/document/d/1MVbBxbKVKRJJY7DnkptHpvz7ROhyAYy4a-TZ-n7Q0r4/edit?usp=sharing [2] https://github.com/bazelbuild/bazel/issues/7849 Change-Id: I8d26dff722c6677ea7642913b61e416b23ea9041
Diffstat (limited to 'WORKSPACE')
-rw-r--r--WORKSPACE5
1 files changed, 4 insertions, 1 deletions
diff --git a/WORKSPACE b/WORKSPACE
index 83838b7017..1d0aaceeb8 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -1,7 +1,6 @@
workspace(name = "jgit")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
-
load("//tools:bazlets.bzl", "load_bazlets")
load_bazlets(commit = "f30a992da9fc855dce819875afb59f9dd6f860cd")
@@ -11,6 +10,10 @@ load(
"maven_jar",
)
+register_toolchains("//tools:error_prone_warnings_toolchain_java11_definition")
+
+register_toolchains("//tools:error_prone_warnings_toolchain_java17_definition")
+
JMH_VERS = "1.32"
maven_jar(