Skip to content

Commit 8b1f1a9

Browse files
Merge pull request #67 from bazelbuild:Wyverald-patch-1
PiperOrigin-RevId: 468442283 Change-Id: I69b0650fb62a5cc52d2cc3ed94d82d2fe69b6814
2 parents 6e03a93 + 81efa22 commit 8b1f1a9

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed

MODULE.bazel

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,7 @@
1-
JDK_VERSIONS = [
2-
"11",
3-
"15",
4-
"16",
5-
"17",
6-
]
7-
8-
PLATFORMS = [
9-
"linux",
10-
"macos",
11-
"macos_aarch64",
12-
"win",
13-
]
14-
15-
# Remote JDK repos for those Linux platforms are only defined for JDK 11.
16-
EXTRA_REMOTE_JDK11_REPOS = [
17-
"remotejdk11_linux_aarch64",
18-
"remotejdk11_linux_ppc64le",
19-
"remotejdk11_linux_s390x",
20-
]
21-
22-
REMOTE_JDK_REPOS = [("remotejdk" + version + "_" + platform) for version in JDK_VERSIONS for platform in PLATFORMS] + EXTRA_REMOTE_JDK11_REPOS
23-
24-
REMOTE_JAVA_TOOLCHAINS = [("@" + name + "_toolchain_config_repo//:toolchain") for name in REMOTE_JDK_REPOS]
25-
261
module(
272
name = "rules_java",
283
compatibility_level = 1,
29-
toolchains_to_register = [
30-
"//toolchains:all",
31-
"@local_jdk//:runtime_toolchain_definition",
32-
] + REMOTE_JAVA_TOOLCHAINS,
33-
version = "4.0.0",
4+
version = "5.1.0",
345
)
356

367
bazel_dep(name = "platforms", version = "0.0.4")
@@ -39,6 +10,8 @@ bazel_dep(name = "rules_cc", version = "0.0.1")
3910
# rules_proto is required by @remote_java_tools, which is loaded via module extension.
4011
bazel_dep(name = "rules_proto", version = "4.0.0")
4112

13+
register_toolchains("//toolchains:all")
14+
4215
toolchains = use_extension("//java:extensions.bzl", "toolchains")
4316

4417
# Declare remote java tools repos
@@ -53,12 +26,39 @@ use_repo(toolchains, "remote_java_tools_darwin")
5326
# Declare local jdk repo
5427
use_repo(toolchains, "local_jdk")
5528

29+
register_toolchains("@local_jdk//:runtime_toolchain_definition")
30+
5631
# Declare all remote jdk toolchain config repos
32+
JDK_VERSIONS = [
33+
"11",
34+
"15",
35+
"16",
36+
"17",
37+
]
38+
39+
PLATFORMS = [
40+
"linux",
41+
"macos",
42+
"macos_aarch64",
43+
"win",
44+
]
45+
46+
# Remote JDK repos for those Linux platforms are only defined for JDK 11.
47+
EXTRA_REMOTE_JDK11_REPOS = [
48+
"remotejdk11_linux_aarch64",
49+
"remotejdk11_linux_ppc64le",
50+
"remotejdk11_linux_s390x",
51+
]
52+
53+
REMOTE_JDK_REPOS = [("remotejdk" + version + "_" + platform) for version in JDK_VERSIONS for platform in PLATFORMS] + EXTRA_REMOTE_JDK11_REPOS
54+
5755
[use_repo(
5856
toolchains,
5957
repo + "_toolchain_config_repo",
6058
) for repo in REMOTE_JDK_REPOS]
6159

60+
[register_toolchains("@" + name + "_toolchain_config_repo//:toolchain") for name in REMOTE_JDK_REPOS]
61+
6262
# Dev dependencies
6363
bazel_dep(name = "rules_pkg", dev_dependency = True, version = "0.5.1")
6464
bazel_dep(name = "bazel_skylib", dev_dependency = True, version = "1.2.0")

0 commit comments

Comments
 (0)