Skip to content

Commit

Permalink
register java toolchain (#1510)
Browse files Browse the repository at this point in the history
  • Loading branch information
mai93 authored Aug 30, 2023
1 parent ae90811 commit a42f009
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
5 changes: 4 additions & 1 deletion scala/private/rules/scala_binary.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ def make_scala_binary(*extras):
common_outputs,
*[extra["outputs"] for extra in extras if "outputs" in extra]
),
toolchains = ["@io_bazel_rules_scala//scala:toolchain_type"],
toolchains = [
"@io_bazel_rules_scala//scala:toolchain_type",
"@bazel_tools//tools/jdk:toolchain_type",
],
incompatible_use_toolchain_transition = True,
implementation = _scala_binary_impl,
)
Expand Down
15 changes: 12 additions & 3 deletions scala/private/rules/scala_library.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,10 @@ def make_scala_library(*extras):
common_outputs,
*[extra["outputs"] for extra in extras if "outputs" in extra]
),
toolchains = ["@io_bazel_rules_scala//scala:toolchain_type"],
toolchains = [
"@io_bazel_rules_scala//scala:toolchain_type",
"@bazel_tools//tools/jdk:toolchain_type",
],
incompatible_use_toolchain_transition = True,
implementation = _scala_library_impl,
)
Expand Down Expand Up @@ -191,7 +194,10 @@ def make_scala_library_for_plugin_bootstrapping(*extras):
common_outputs,
*[extra["outputs"] for extra in extras if "outputs" in extra]
),
toolchains = ["@io_bazel_rules_scala//scala:toolchain_type"],
toolchains = [
"@io_bazel_rules_scala//scala:toolchain_type",
"@bazel_tools//tools/jdk:toolchain_type",
],
incompatible_use_toolchain_transition = True,
implementation = _scala_library_for_plugin_bootstrapping_impl,
)
Expand Down Expand Up @@ -259,7 +265,10 @@ def make_scala_macro_library(*extras):
common_outputs,
*[extra["outputs"] for extra in extras if "outputs" in extra]
),
toolchains = ["@io_bazel_rules_scala//scala:toolchain_type"],
toolchains = [
"@io_bazel_rules_scala//scala:toolchain_type",
"@bazel_tools//tools/jdk:toolchain_type",
],
incompatible_use_toolchain_transition = True,
implementation = _scala_macro_library_impl,
)
Expand Down
5 changes: 4 additions & 1 deletion scala/private/rules/scala_test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,10 @@ def make_scala_test(*extras):
*[extra["outputs"] for extra in extras if "outputs" in extra]
),
test = True,
toolchains = ["@io_bazel_rules_scala//scala:toolchain_type"],
toolchains = [
"@io_bazel_rules_scala//scala:toolchain_type",
"@bazel_tools//tools/jdk:toolchain_type",
],
incompatible_use_toolchain_transition = True,
implementation = _scala_test_impl,
)
Expand Down

0 comments on commit a42f009

Please sign in to comment.