From e63f7d96a9588750ea873324ccebae2a1aa3f98a Mon Sep 17 00:00:00 2001 From: Yun Peng Date: Fri, 13 Dec 2024 14:32:44 +0100 Subject: [PATCH] Register scalca test toolchain --- BUILD.bazel | 14 ++++++++++++++ MODULE.bazel | 7 +------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/BUILD.bazel b/BUILD.bazel index 77985a43..62ca5ff0 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -14,6 +14,7 @@ # ################################################################################ # +load("@io_bazel_rules_scala//scala:scala.bzl", "setup_scala_testing_toolchain") load("@bazel_gazelle//:def.bzl", "gazelle") load("@python_versions//3.11:defs.bzl", "compile_pip_requirements") @@ -31,3 +32,16 @@ compile_pip_requirements( requirements_in = "requirements.in", requirements_txt = "requirements_lock.txt", ) + +setup_scala_testing_toolchain( + name = "scalatest_toolchain", + scalatest_classpath = [ + "@maven//:org_scalactic_scalactic_2_13", + "@maven//:org_scalatest_scalatest_2_13", + "@maven//:org_scalatest_scalatest_compatible", + "@maven//:org_scalatest_scalatest_core_2_13", + "@maven//:org_scalatest_scalatest_flatspec_2_13", + "@maven//:org_scalatest_scalatest_matchers_core_2_13", + "@maven//:org_scalatest_scalatest_mustmatchers_2_13", + ], +) diff --git a/MODULE.bazel b/MODULE.bazel index ab95b434..860f4098 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -56,12 +56,7 @@ use_repo(pip, "rules_webtesting_py_deps") ##### Scala dependencies ##### -register_toolchains( - # "@io_bazel_rules_scala//scala:unused_dependency_checker_error_toolchain", - # "@io_bazel_rules_scala//test/proto:scalapb_toolchain", - "@io_bazel_rules_scala//test/toolchains:java21_toolchain_definition", - dev_dependency = True, -) +register_toolchains('//:scalatest_toolchain') ##### Browsers dependencies ##### browser_repositories = use_extension("//web/versioned:browsers-0.3.3.bzl", "browser_repositories_extension")