Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,14 @@ JDKS = {
"win",
"win_arm64",
],
"25": [
"linux",
"linux_aarch64",
"macos",
"macos_aarch64",
"win",
"win_arm64",
],
}

REMOTE_JDK_REPOS = [(("remote_jdk" if version == "8" else "remotejdk") + version + "_" + platform) for version in JDKS for platform in JDKS[version]]
Expand Down
10 changes: 10 additions & 0 deletions java/bazel/repositories_util.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,16 @@ _RELEASE_CONFIGS = {
},
},
},
"25": {
"zulu": {
"release": "25.28.85-ca-jdk25.0.0",
"platforms": {
"linux": ["aarch64", "x86_64"],
"macos": ["aarch64", "x86_64"],
"windows": ["arm64", "x86_64"],
},
},
},
}

_STRIP_PREFIX_OVERRIDES = {
Expand Down
2 changes: 2 additions & 0 deletions java/extensions.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ load(
"remote_jdk11_repos",
"remote_jdk17_repos",
"remote_jdk21_repos",
"remote_jdk25_repos",
"remote_jdk8_repos",
)
load("//toolchains:extensions.bzl", _java_repository = "java_repository")
Expand All @@ -32,6 +33,7 @@ def _toolchains_impl(module_ctx):
remote_jdk11_repos()
remote_jdk17_repos()
remote_jdk21_repos()
remote_jdk25_repos()

if bazel_features.external_deps.extension_metadata_has_reproducible:
return module_ctx.extension_metadata(reproducible = True)
Expand Down
53 changes: 53 additions & 0 deletions java/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,54 @@ _REMOTE_JDK_CONFIGS_LIST = [
urls = ["https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.6+7/OpenJDK21U-jdk_s390x_linux_hotspot_21.0.6_7.tar.gz", "https://mirror.bazel.build/github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.6+7/OpenJDK21U-jdk_s390x_linux_hotspot_21.0.6_7.tar.gz"],
version = "21",
),
struct(
name = "remotejdk25_linux_aarch64",
target_compatible_with = ["@platforms//os:linux", "@platforms//cpu:aarch64"],
sha256 = "b60eb9d54c97ba4159547834a98cc5d016281dd2b3e60e7475cba4911324bcb4",
strip_prefix = "zulu25.28.85-ca-jdk25.0.0-linux_aarch64",
urls = ["https://cdn.azul.com/zulu/bin/zulu25.28.85-ca-jdk25.0.0-linux_aarch64.tar.gz", "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu25.28.85-ca-jdk25.0.0-linux_aarch64.tar.gz"],
version = "25",
),
struct(
name = "remotejdk25_linux",
target_compatible_with = ["@platforms//os:linux", "@platforms//cpu:x86_64"],
sha256 = "164d901e5a240b8c18516f5ab55bc11fc9689ab6e829045aea8467356dcdb340",
strip_prefix = "zulu25.28.85-ca-jdk25.0.0-linux_x64",
urls = ["https://cdn.azul.com/zulu/bin/zulu25.28.85-ca-jdk25.0.0-linux_x64.tar.gz", "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu25.28.85-ca-jdk25.0.0-linux_x64.tar.gz"],
version = "25",
),
struct(
name = "remotejdk25_macos_aarch64",
target_compatible_with = ["@platforms//os:macos", "@platforms//cpu:aarch64"],
sha256 = "73f64f6bad7c3df31fba740fbcbbbef7c1a5cedeffbb5df386dd79bc72aba9b6",
strip_prefix = "zulu25.28.85-ca-jdk25.0.0-macosx_aarch64",
urls = ["https://cdn.azul.com/zulu/bin/zulu25.28.85-ca-jdk25.0.0-macosx_aarch64.tar.gz", "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu25.28.85-ca-jdk25.0.0-macosx_aarch64.tar.gz"],
version = "25",
),
struct(
name = "remotejdk25_macos",
target_compatible_with = ["@platforms//os:macos", "@platforms//cpu:x86_64"],
sha256 = "c2cde1d313d904b793c3760214eefa207ecca7df04e7c4084abdf1f6bbebc27a",
strip_prefix = "zulu25.28.85-ca-jdk25.0.0-macosx_x64",
urls = ["https://cdn.azul.com/zulu/bin/zulu25.28.85-ca-jdk25.0.0-macosx_x64.tar.gz", "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu25.28.85-ca-jdk25.0.0-macosx_x64.tar.gz"],
version = "25",
),
struct(
name = "remotejdk25_win_arm64",
target_compatible_with = ["@platforms//os:windows", "@platforms//cpu:arm64"],
sha256 = "f5f6d8a913695649e8e2607fe0dc79c81953b2583013ac1fb977c63cb4935bfb",
strip_prefix = "zulu25.28.85-ca-jdk25.0.0-win_aarch64",
urls = ["https://cdn.azul.com/zulu/bin/zulu25.28.85-ca-jdk25.0.0-win_aarch64.zip", "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu25.28.85-ca-jdk25.0.0-win_aarch64.zip"],
version = "25",
),
struct(
name = "remotejdk25_win",
target_compatible_with = ["@platforms//os:windows", "@platforms//cpu:x86_64"],
sha256 = "5efcf4e6a613cae06c8041de8a3695b7346aad0307d397b66bf55281cf1a5cb6",
strip_prefix = "zulu25.28.85-ca-jdk25.0.0-win_x64",
urls = ["https://cdn.azul.com/zulu/bin/zulu25.28.85-ca-jdk25.0.0-win_x64.zip", "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu25.28.85-ca-jdk25.0.0-win_x64.zip"],
version = "25",
),
]

def _make_version_to_remote_jdks():
Expand Down Expand Up @@ -369,6 +417,10 @@ def remote_jdk21_repos():
"""Imports OpenJDK 21 repositories."""
_remote_jdk_repos_for_version("21")

def remote_jdk25_repos():
"""Imports OpenJDK 25 repositories."""
_remote_jdk_repos_for_version("25")

def rules_java_dependencies():
"""DEPRECATED: No-op, kept for backwards compatibility"""
print("DEPRECATED: use rules_java_dependencies() from rules_java_deps.bzl") # buildifier: disable=print
Expand All @@ -384,6 +436,7 @@ def rules_java_toolchains(name = "toolchains"):
remote_jdk11_repos()
remote_jdk17_repos()
remote_jdk21_repos()
remote_jdk25_repos()
java_tools_repos()

native.register_toolchains(
Expand Down
10 changes: 8 additions & 2 deletions toolchains/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -353,12 +353,12 @@ alias(
actual = ":toolchain",
)

RELEASES = (8, 9, 10, 11, 17, 21)
RELEASES = (8, 9, 10, 11, 17, 21, 25)

[
default_java_toolchain(
name = ("toolchain_java%d" if release <= 11 else "toolchain_jdk_%d") % release,
configuration = DEFAULT_TOOLCHAIN_CONFIGURATION,
configuration = DEFAULT_TOOLCHAIN_CONFIGURATION if release <= 21 else DEFAULT_TOOLCHAIN_CONFIGURATION | {"java_runtime": ":remotejdk_%d" % release},
source_version = "%s" % release,
target_version = "%s" % release,
)
Expand Down Expand Up @@ -390,6 +390,12 @@ java_runtime_version_alias(
visibility = ["//visibility:public"],
)

java_runtime_version_alias(
name = "remotejdk_25",
runtime_version = "remotejdk_25",
visibility = ["//visibility:public"],
)

java_runtime_version_alias(
name = "jdk_8",
runtime_version = "8",
Expand Down