|
1 | 1 | load("@io_bazel_rules_scala//scala:scala.bzl", "setup_scala_testing_toolchain") |
2 | 2 | load("//scala:scala_cross_version.bzl", "version_suffix") |
3 | | -load("@io_bazel_rules_scala_config//:config.bzl", "SCALA_VERSION") |
| 3 | +load("@io_bazel_rules_scala_config//:config.bzl", "SCALA_VERSION", "SCALA_VERSIONS") |
4 | 4 |
|
5 | 5 | _SPECS2_DEPS = [ |
6 | 6 | "@io_bazel_rules_scala_org_specs2_specs2_common", |
@@ -33,19 +33,38 @@ _SCALATEST_DEPS = [ |
33 | 33 | "@io_bazel_rules_scala_scalatest_shouldmatchers", |
34 | 34 | ] |
35 | 35 |
|
36 | | -setup_scala_testing_toolchain( |
| 36 | +[ |
| 37 | + setup_scala_testing_toolchain( |
| 38 | + name = "testing_toolchain" + version_suffix(scala_version), |
| 39 | + junit_classpath = _JUNIT_DEPS, |
| 40 | + scala_version = scala_version, |
| 41 | + scalatest_classpath = [dep + version_suffix(scala_version) for dep in _SCALATEST_DEPS], |
| 42 | + specs2_classpath = _SPECS2_DEPS, |
| 43 | + specs2_junit_classpath = _SPECS2_JUNIT_DEPS, |
| 44 | + visibility = ["//visibility:public"], |
| 45 | + ) |
| 46 | + for scala_version in SCALA_VERSIONS |
| 47 | +] |
| 48 | + |
| 49 | +[ |
| 50 | + setup_scala_testing_toolchain( |
| 51 | + name = "scalatest_toolchain" + version_suffix(scala_version), |
| 52 | + scala_version = scala_version, |
| 53 | + scalatest_classpath = [dep + version_suffix(scala_version) for dep in _SCALATEST_DEPS], |
| 54 | + visibility = ["//visibility:public"], |
| 55 | + ) |
| 56 | + for scala_version in SCALA_VERSIONS |
| 57 | +] |
| 58 | + |
| 59 | +# Aliases for backward compatibility: |
| 60 | +alias( |
37 | 61 | name = "testing_toolchain", |
38 | | - junit_classpath = _JUNIT_DEPS, |
39 | | - scalatest_classpath = [dep + version_suffix(SCALA_VERSION) for dep in _SCALATEST_DEPS], |
40 | | - specs2_classpath = _SPECS2_DEPS, |
41 | | - specs2_junit_classpath = _SPECS2_JUNIT_DEPS, |
42 | | - visibility = ["//visibility:public"], |
| 62 | + actual = "testing_toolchain" + version_suffix(SCALA_VERSION), |
43 | 63 | ) |
44 | 64 |
|
45 | | -setup_scala_testing_toolchain( |
| 65 | +alias( |
46 | 66 | name = "scalatest_toolchain", |
47 | | - scalatest_classpath = [dep + version_suffix(SCALA_VERSION) for dep in _SCALATEST_DEPS], |
48 | | - visibility = ["//visibility:public"], |
| 67 | + actual = "scalatest_toolchain" + version_suffix(SCALA_VERSION), |
49 | 68 | ) |
50 | 69 |
|
51 | 70 | setup_scala_testing_toolchain( |
|
0 commit comments