@@ -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
@@ -33,17 +35,17 @@ object ScalatestBuild {
33
35
34
36
// To enable deprecation warnings on the fly
35
37
// set scalacOptions in ThisBuild ++= Seq("-unchecked", "-deprecation")
36
-
37
38
// To temporarily switch sbt to a different Scala version:
38
39
// > ++ 2.10.5
39
- lazy val supportedScalaVersions = List (" 2.12.8" , " 2.11.12" , " 2.10.7" , " 2.13.0-RC3" )
40
40
41
- val releaseVersion = " 3.1.0-SNAP12"
41
+ lazy val supportedScalaVersions = List (" 2.13.0" , " 2.12.8" , " 2.11.12" , " 2.10.7" )
42
+
43
+ val releaseVersion = " 3.1.0-SNAP13"
42
44
43
45
val previousReleaseVersion = " 3.0.5"
44
46
45
- val plusJUnitVersion = " 1.0.0-SNAP8 "
46
- val plusTestNGVersion = " 1.0.0-SNAP7 "
47
+ val plusJUnitVersion = " 1.0.0-SNAP9 "
48
+ val plusTestNGVersion = " 1.0.0-SNAP8 "
47
49
val flexmarkVersion = " 0.35.10"
48
50
49
51
val githubTag = " release-3.1.0" // for scaladoc source urls
@@ -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
@@ -212,15 +216,14 @@ object ScalatestBuild {
212
216
// if scala 2.13+ is used, add dependency on scala-parallel-collections module
213
217
case Some ((2 , scalaMajor)) if scalaMajor >= 13 =>
214
218
Seq (
215
- // We'll do without scala-parallel-collections until it catches up with Scala 2.13.0-M4.
216
219
// "org.scala-lang.modules" %% "scala-parallel-collections" % "0.1.2",
217
220
" org.scala-lang.modules" %%% " scala-parser-combinators" % " 1.1.2"
218
221
)
219
222
220
223
case Some ((2 , scalaMajor)) if scalaMajor >= 11 =>
221
224
Seq (" org.scala-lang.modules" %%% " scala-parser-combinators" % " 1.1.1" )
222
225
223
- case other =>
226
+ case _ =>
224
227
Seq .empty
225
228
}
226
229
}
@@ -597,6 +600,7 @@ object ScalatestBuild {
597
600
.settings(
598
601
projectTitle := " Scalactic" ,
599
602
organization := " org.scalactic" ,
603
+ moduleName := " scalactic" ,
600
604
initialCommands in console := " import org.scalactic._" ,
601
605
sourceGenerators in Compile += {
602
606
Def .task{
@@ -618,12 +622,9 @@ object ScalatestBuild {
618
622
GenScalacticDotty .genResource((resourceManaged in Compile ).value)
619
623
}.taskValue
620
624
},
621
- // include the macro classes and resources in the main jar
622
- mappings in (Compile , packageBin) ++= mappings.in(scalacticMacro, Compile , packageBin).value,
623
- // include the macro sources in the main source jar
624
- mappings in (Compile , packageSrc) ++= mappings.in(scalacticMacro, Compile , packageSrc).value,
625
- scalacticDocSourcesSetting,
626
- docTaskSetting,
625
+ // scalacticDocSourcesSetting,
626
+ // docTaskSetting,
627
+ publishArtifact in (Compile , packageDoc) := false , // Temporary disable publishing of doc, can't get it to build.
627
628
mimaPreviousArtifacts := Set (organization.value %% name.value % previousReleaseVersion),
628
629
mimaCurrentClassfiles := (classDirectory in Compile ).value.getParentFile / (name.value + " _" + scalaBinaryVersion.value + " -" + releaseVersion + " .jar" )
629
630
).settings(osgiSettings : _* ).settings(
@@ -950,6 +951,7 @@ object ScalatestBuild {
950
951
initialCommands in console := """ |import org.scalatest._
951
952
|import org.scalactic._
952
953
|import Matchers._""" .stripMargin,
954
+ libraryDependencies ++= scalaXmlDependency(scalaVersion.value),
953
955
libraryDependencies ++= scalatestLibraryDependencies,
954
956
sourceGenerators in Compile += {
955
957
Def .task {
@@ -982,7 +984,8 @@ object ScalatestBuild {
982
984
// GenSafeStyles.genMain((sourceManaged in Compile).value / "org" / "scalatest", version.value, scalaVersion.value)
983
985
}.taskValue
984
986
},
985
- scalatestJSDocTaskSetting,
987
+ // scalatestJSDocTaskSetting,
988
+ publishArtifact in (Compile , packageDoc) := false , // Temporary disable publishing of doc, can't get it to build.
986
989
mimaPreviousArtifacts := Set (organization.value %% name.value % previousReleaseVersion),
987
990
mimaCurrentClassfiles := (classDirectory in Compile ).value.getParentFile / (name.value + " _" + scalaBinaryVersion.value + " -" + releaseVersion + " .jar" ),
988
991
mimaBinaryIssueFilters ++= {
@@ -2147,7 +2150,6 @@ object ScalatestBuild {
2147
2150
(resourceManaged in Compile ).value,
2148
2151
name.value)
2149
2152
2150
- import dotty .tools .sbtplugin .DottyPlugin .autoImport ._
2151
2153
// List of available night build at https://repo1.maven.org/maven2/ch/epfl/lamp/dotty-compiler_0.14/
2152
2154
lazy val dottyVersion = dottyLatestNightlyBuild.get
2153
2155
// lazy val dottyVersion = "0.15.0-bin-20190522-ffb250d-NIGHTLY"
0 commit comments