@@ -115,7 +115,7 @@ object ScalatestBuild extends Build {
115
115
def sharedSettings : Seq [Setting [_]] = Seq (
116
116
javaHome := getJavaHome(scalaBinaryVersion.value),
117
117
scalaVersion := buildScalaVersion,
118
- crossScalaVersions := Seq (buildScalaVersion, " 2.10.6" , " 2.12.0 " ),
118
+ crossScalaVersions := Seq (" 2.10.6" , " 2.11.8 " , buildScalaVersion ),
119
119
version := releaseVersion,
120
120
scalacOptions ++= Seq (" -feature" , " -target:jvm-1.6" ),
121
121
resolvers += " Sonatype Public" at " https://oss.sonatype.org/content/groups/public" ,
@@ -214,11 +214,14 @@ object ScalatestBuild extends Build {
214
214
}
215
215
}
216
216
217
- def scalaLibraries (theScalaVersion : String ) =
217
+ def scalaLibraries (theScalaVersion : String ) = {
218
+ val isDotty = theScalaVersion.startsWith(" 0." )
219
+ val version = if (isDotty) " 2.12.3" else theScalaVersion
218
220
Seq (
219
- " org.scala-lang" % " scala-compiler" % theScalaVersion % " provided" ,
220
- " org.scala-lang" % " scala-reflect" % theScalaVersion // this is needed to compile macro
221
+ " org.scala-lang" % " scala-compiler" % version % " provided" ,
222
+ " org.scala-lang" % " scala-reflect" % version // this is needed to compile macro
221
223
)
224
+ }
222
225
223
226
def scalatestLibraryDependencies =
224
227
Seq (
@@ -399,6 +402,7 @@ object ScalatestBuild extends Build {
399
402
publish := {},
400
403
publishLocal := {}
401
404
)
405
+ .settings(dottySettings)
402
406
403
407
lazy val deleteJsDependenciesTask = taskKey[Unit ](" Delete JS_DEPENDENCIES" )
404
408
@@ -488,6 +492,7 @@ object ScalatestBuild extends Build {
488
492
" Bundle-Vendor" -> " Artima, Inc."
489
493
)
490
494
).dependsOn(scalacticMacro % " compile-internal, test-internal" ) // avoid dependency in pom on non-existent scalactic-macro artifact, per discussion in http://grokbase.com/t/gg/simple-build-tool/133shekp07/sbt-avoid-dependence-in-a-macro-based-project
495
+ .settings(dottySettings)
491
496
492
497
lazy val scalacticJS = Project (" scalacticJS" , file(" scalactic.js" ))
493
498
.settings(sharedSettings : _* )
@@ -737,6 +742,7 @@ object ScalatestBuild extends Build {
737
742
" Main-Class" -> " org.scalatest.tools.Runner"
738
743
)
739
744
).dependsOn(scalacticMacro % " compile-internal, test-internal" , scalactic)
745
+ .settings(dottySettings)
740
746
741
747
lazy val scalatestTest = Project (" scalatest-test" , file(" scalatest-test" ))
742
748
.settings(sharedSettings : _* )
@@ -1938,8 +1944,18 @@ object ScalatestBuild extends Build {
1938
1944
doc in Compile := docTask((doc in Compile ).value,
1939
1945
(resourceManaged in Compile ).value,
1940
1946
name.value)
1947
+
1948
+ import dotty .tools .sbtplugin .DottyPlugin .autoImport ._
1949
+ // lazy val dottyVersion = dottyLatestNightlyBuild.get
1950
+ lazy val dottyVersion = " 0.8.0-bin-20180411-7b91742-NIGHTLY"
1951
+ lazy val dottySettings = List (
1952
+ scalaVersion := dottyVersion,
1953
+ libraryDependencies := libraryDependencies.value.map(_.withDottyCompat()),
1954
+ scalacOptions := List (" -language:Scala2" )
1955
+ )
1941
1956
}
1942
1957
// set scalacOptions in (Compile, console) += "-Xlog-implicits"
1943
1958
// set scalacOptions in (Compile, console) += "-Xlog-implicits"
1944
1959
// set scalacOptions in (Compile, console) += "-Xlog-implicits"
1945
1960
// set scalacOptions in (Compile, console) += "-nowarn"
1961
+
0 commit comments