lunatech-labs/lunatech-scala2-to-scala3-course

Remove scalatest dependancy from crossDependencies

Closed this issue · 0 comments

sbt-dotty plugin is used to manage dependencies that are compatible with a specific dotty version.

It is useful when your build contains dependencies that have only been published with Scala 2.x, if you have:

libraryDependencies += "a" %% "b" % "c"

you can replace it by:

libraryDependencies += ("a" %% "b" % "c").withDottyCompat(scalaVersion.value)

when compiling with Dotty this will change the cross-version to a Scala 2.x one.

ScalatTest now have artifacts published for 0.24.x and it is safe to move it out of crossDependancies and sbt will resolve it automatically based on the specified scalaVersion.