diff --git a/MODULE.bazel b/MODULE.bazel index 7e4dba680b13..22a1f2e8758b 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -72,3 +72,15 @@ REMOTE_JBR21_REPOS = ["remotejbr21_" + platform for platform in [ ) for repo in REMOTE_JBR21_REPOS] [register_toolchains("@" + repo + "_toolchain_config_repo//:all") for repo in REMOTE_JBR21_REPOS] + +# Use custom remote_java_tools_windows with vc_redist .dll files due to https://github.com/bazelbuild/rules_java/issues/316 +http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") +http_archive( + name = "remote_java_tools_windows_with_vc_redist", + sha256 = "9ec4e41ebbb2b7259eb14f1ad708e8ee60087f33515bdec4876c675205e6950f", + url = "https://packages.jetbrains.team/files/p/ij/intellij-build-dependencies/rules-java/java_tools_windows-v13.18-with-vc_redist.zip", +) +override_repo( + use_extension("@rules_java//java:extensions.bzl", "toolchains"), + remote_java_tools_windows = "remote_java_tools_windows_with_vc_redist", +) diff --git a/platform/build-scripts/bazel/MODULE.bazel b/platform/build-scripts/bazel/MODULE.bazel index 4567a8c8d050..78778220eb20 100644 --- a/platform/build-scripts/bazel/MODULE.bazel +++ b/platform/build-scripts/bazel/MODULE.bazel @@ -60,4 +60,16 @@ git_override( module_name = "rules_python", remote = "https://github.com/JetBrains/rules_python.git", commit = "92bf73a6867f143c5af49274f02140d118b84bb0" -) \ No newline at end of file +) + +# Use custom remote_java_tools_windows with vc_redist .dll files due to https://github.com/bazelbuild/rules_java/issues/316 +http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") +http_archive( + name = "remote_java_tools_windows_with_vc_redist", + sha256 = "9ec4e41ebbb2b7259eb14f1ad708e8ee60087f33515bdec4876c675205e6950f", + url = "https://packages.jetbrains.team/files/p/ij/intellij-build-dependencies/rules-java/java_tools_windows-v13.18-with-vc_redist.zip", +) +override_repo( + use_extension("@rules_java//java:extensions.bzl", "toolchains"), + remote_java_tools_windows = "remote_java_tools_windows_with_vc_redist", +)