diff --git a/testing/junit.bzl b/testing/junit.bzl index a87ac6817..2208675b9 100644 --- a/testing/junit.bzl +++ b/testing/junit.bzl @@ -1,7 +1,12 @@ load("//junit:junit.bzl", _repositories = "junit_repositories") +load("//scala:scala_cross_version.bzl", "version_suffix") +load("@io_bazel_rules_scala_config//:config.bzl", "SCALA_VERSIONS") def junit_repositories(): _repositories() def junit_toolchain(): - native.register_toolchains("@io_bazel_rules_scala//testing:junit_toolchain") + for scala_version in SCALA_VERSIONS: + native.register_toolchains(str(Label( + "//testing:junit_toolchain" + version_suffix(scala_version), + ))) diff --git a/testing/scalatest.bzl b/testing/scalatest.bzl index 3260aa457..1d66fe50c 100644 --- a/testing/scalatest.bzl +++ b/testing/scalatest.bzl @@ -1,5 +1,5 @@ -load("//scalatest:scalatest.bzl", _repositories = "scalatest_repositories") load("//scala:scala_cross_version.bzl", "version_suffix") +load("//scalatest:scalatest.bzl", _repositories = "scalatest_repositories") load("@io_bazel_rules_scala_config//:config.bzl", "SCALA_VERSIONS") def scalatest_repositories(): @@ -8,6 +8,5 @@ def scalatest_repositories(): def scalatest_toolchain(): for scala_version in SCALA_VERSIONS: native.register_toolchains(str(Label( - "//testing:scalatest_toolchain" + - version_suffix(scala_version), + "//testing:scalatest_toolchain" + version_suffix(scala_version), ))) diff --git a/testing/specs2_junit.bzl b/testing/specs2_junit.bzl index a7da792d8..eed731317 100644 --- a/testing/specs2_junit.bzl +++ b/testing/specs2_junit.bzl @@ -1,7 +1,12 @@ +load("//scala:scala_cross_version.bzl", "version_suffix") load("//specs2:specs2_junit.bzl", _repositories = "specs2_junit_repositories") +load("@io_bazel_rules_scala_config//:config.bzl", "SCALA_VERSIONS") def specs2_junit_repositories(): _repositories() def specs2_junit_toolchain(): - native.register_toolchains("@io_bazel_rules_scala//testing:specs2_junit_toolchain") + for scala_version in SCALA_VERSIONS: + native.register_toolchains(str(Label( + "//testing:specs2_junit_toolchain" + version_suffix(scala_version), + )))