Skip to content

Commit 94d0e6c

Browse files
committed
fix specs2 Scala 3 compatibility
1 parent 447a02a commit 94d0e6c

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

project/Dependencies.scala

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,13 @@ object Dependencies {
2121
private val scalaTestSeleniumVersion_scala3 = "3.2.9.0"
2222
private val junitVersion = "4.13.2"
2323
private val munitVersion = "1.1.1"
24-
private val specs2Version = "4.20.5"
24+
25+
private val specs2Version = Def.setting {
26+
CrossVersion.partialVersion(scalaVersion.value) match {
27+
case Some((2, _)) => "4.20.5"
28+
case _ => "5.6.4" // Scala 3
29+
}
30+
}
2531
private val mysqlConnectorVersion = "5.1.42"
2632
private val neo4jConnectorVersion = "4.0.0"
2733
private val oracleDriverVersion = "21.18.0.0"
@@ -85,10 +91,9 @@ object Dependencies {
8591

8692
val specs2 = Def.setting {
8793
PROVIDED(
88-
"org.specs2" %% "specs2-core" % specs2Version
94+
"org.specs2" %% "specs2-core" % specs2Version.value
8995
) ++ TEST(
90-
"org.mockito" % "mockito-core" % mockitoVersion,
91-
"org.specs2" %% "specs2-mock" % specs2Version
96+
"org.mockito" % "mockito-core" % mockitoVersion
9297
)
9398
}
9499

0 commit comments

Comments
 (0)