From 49de52c3e775e33ea61f498924dd408ff79a45d4 Mon Sep 17 00:00:00 2001 From: Felix Bruckmeier Date: Thu, 28 Jul 2022 12:39:04 +0200 Subject: [PATCH] util-test: Scala 3 support --- build.sbt | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/build.sbt b/build.sbt index ef572dfff7..0d40868796 100644 --- a/build.sbt +++ b/build.sbt @@ -650,12 +650,25 @@ lazy val utilTest = Project( id = "util-test", base = file("util-test") ).settings( - sharedSettings + sharedScala3EnabledSettings ).settings( name := "util-test", - libraryDependencies ++= Seq( - "org.mockito" % "mockito-all" % "1.10.19", - "org.scalatestplus" %% "mockito-1-10" % "3.1.0.0" + libraryDependencies ++= ( + if (scalaVersion.value.startsWith("2")) + Seq( + "org.mockito" % "mockito-all" % "1.10.19", + "org.scalatestplus" %% "mockito-1-10" % "3.1.0.0" + ) + else + Seq( + // We keep this ancient version for now as it's unclear how much source incompatibility a jump to 3.4.x would + // cause to consumers of this module. + // If we run into compatibility issues with new versions of scalatest-mockito we will have to upgrade to + // mockito-core 3.4.x for Scala 2 and 3. + "org.mockito" % "mockito-all" % "1.10.19", + "org.scalatest" %% "scalatest" % "3.2.9", + "org.scalatestplus" %% "mockito-3-4" % "3.2.9.0" + ) ) ).dependsOn(utilCore, utilLogging, utilStats)