Skip to content

Commit

Permalink
specify local jdk runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
ramil-bitrise committed Jan 8, 2025
1 parent f6b4eef commit 35291cd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ build:windows --cxxopt=/std:c++17
build:windows --host_cxxopt=/std:c++17

# Enable Java 21 language features
build --java_runtime_version=21
build --java_runtime_version=rbe_jdk21
build --java_language_version=21
build --tool_java_language_version=21
build --tool_java_runtime_version=21
build --tool_java_runtime_version=rbe_jdk21

# Fail if a glob doesn't match anything (https://github.com/bazelbuild/bazel/issues/8195)
common --incompatible_disallow_empty_glob
Expand Down
7 changes: 7 additions & 0 deletions BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Bazel - Google's Build System

load("@bazel_skylib//rules:write_file.bzl", "write_file")
load("@rules_java//toolchains:local_java_repository.bzl", "local_java_runtime")
load("@rules_license//rules:license.bzl", "license")
load("@rules_pkg//pkg:tar.bzl", "pkg_tar")
load("@rules_python//python:defs.bzl", "py_binary")
Expand Down Expand Up @@ -319,3 +320,9 @@ REMOTE_PLATFORMS = ("rbe_ubuntu2004",)
)
for platform_name in REMOTE_PLATFORMS
]

local_java_runtime(
name = "rbe_jdk21",
java_home = "/Users/vagrant/.jenv/versions/21",
version = "21",
)

0 comments on commit 35291cd

Please sign in to comment.