Skip to content

Commit

Permalink
Adding workaround patch to pin toolchain by default to jdk 11
Browse files Browse the repository at this point in the history
  • Loading branch information
EdbertChan committed Oct 25, 2023
1 parent 2078ee1 commit cf503d0
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
4 changes: 4 additions & 0 deletions distdir_deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ DIST_DEPS = {
"used_in": [
"additional_distfiles",
],
"patch_args": ["-p1"],
"patches": [
"//third_party/java:rules_java.patch",
],
"license_kinds": [
"@rules_license//licenses/spdx:Apache-2.0",
],
Expand Down
7 changes: 7 additions & 0 deletions third_party/java/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
licenses(["notice"])

filegroup(
name = "patch",
srcs = glob([rules_java.path]), # glob everything to satisfy the compile.sh srcs test
visibility = ["//third_party:__pkg__"],
)
12 changes: 12 additions & 0 deletions third_party/java/rules_java.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/toolchains/BUILD b/toolchains/BUILD
index b8cb35d..25f03ed 100644
--- a/toolchains/BUILD
+++ b/toolchains/BUILD
@@ -224,6 +224,7 @@ RELEASES = (8, 9, 10, 11)
configuration = DEFAULT_TOOLCHAIN_CONFIGURATION,
source_version = "%s" % release,
target_version = "%s" % release,
+ java_runtime = "@bazel_tools//tools/jdk:remote_jdk11",
)
for release in RELEASES
]

0 comments on commit cf503d0

Please sign in to comment.