@@ -25,6 +25,8 @@ import com.typesafe.tools.mima.plugin.MimaKeys.{mimaPreviousArtifacts, mimaCurre
25
25
import com .typesafe .tools .mima .core ._
26
26
import com .typesafe .tools .mima .core .ProblemFilters ._
27
27
28
+ import dotty .tools .sbtplugin .DottyPlugin .autoImport ._
29
+
28
30
object ScalatestBuild {
29
31
30
32
// To run gentests
@@ -174,8 +176,10 @@ object ScalatestBuild {
174
176
175
177
def scalaXmlDependency (theScalaVersion : String ): Seq [ModuleID ] =
176
178
CrossVersion .partialVersion(theScalaVersion) match {
177
- case Some ((2 , scalaMajor)) if scalaMajor >= 11 => Seq (" org.scala-lang.modules" %% " scala-xml" % " 1.2.0" )
178
- case other => Seq .empty
179
+ case Some ((scalaEpoch, scalaMajor)) if scalaEpoch != 2 || scalaMajor >= 11 =>
180
+ Seq ((" org.scala-lang.modules" %% " scala-xml" % " 1.2.0" ).withDottyCompat(theScalaVersion))
181
+ case other =>
182
+ Seq .empty
179
183
}
180
184
181
185
@@ -946,6 +950,7 @@ object ScalatestBuild {
946
950
initialCommands in console := """ |import org.scalatest._
947
951
|import org.scalactic._
948
952
|import Matchers._""" .stripMargin,
953
+ libraryDependencies ++= scalaXmlDependency(scalaVersion.value),
949
954
libraryDependencies ++= scalatestLibraryDependencies,
950
955
sourceGenerators in Compile += {
951
956
Def .task {
@@ -2133,7 +2138,6 @@ object ScalatestBuild {
2133
2138
(resourceManaged in Compile ).value,
2134
2139
name.value)
2135
2140
2136
- import dotty .tools .sbtplugin .DottyPlugin .autoImport ._
2137
2141
// List of available night build at https://repo1.maven.org/maven2/ch/epfl/lamp/dotty-compiler_0.14/
2138
2142
lazy val dottyVersion = dottyLatestNightlyBuild.get
2139
2143
// lazy val dottyVersion = "0.15.0-bin-20190522-ffb250d-NIGHTLY"
0 commit comments