@@ -15,11 +15,11 @@ import org.scalajs.sbtplugin.ScalaJSPlugin.autoImport.{scalaJSLinkerConfig, jsEn
15
15
16
16
import sbtcrossproject .CrossPlugin .autoImport ._
17
17
18
- import scalanative .sbtplugin .ScalaNativePlugin
19
- import scalanative .tools
20
- import scalanative .optimizer .{inject , pass }
21
- import scalanative .sbtplugin .ScalaNativePluginInternal .{nativeConfig , nativeOptimizerDriver , nativeLinkerReporter , nativeOptimizerReporter , NativeTest }
22
- import ScalaNativePlugin .autoImport ._
18
+ // import scalanative.sbtplugin.ScalaNativePlugin
19
+ // import scalanative.tools
20
+ // import scalanative.optimizer.{inject, pass}
21
+ // import scalanative.sbtplugin.ScalaNativePluginInternal.{nativeConfig, nativeOptimizerDriver, nativeLinkerReporter, nativeOptimizerReporter, NativeTest}
22
+ // import ScalaNativePlugin.autoImport._
23
23
24
24
import com .typesafe .tools .mima .plugin .MimaKeys .{mimaPreviousArtifacts , mimaCurrentClassfiles , mimaBinaryIssueFilters }
25
25
import com .typesafe .tools .mima .core ._
@@ -34,9 +34,10 @@ object ScalatestBuild {
34
34
// To enable deprecation warnings on the fly
35
35
// set scalacOptions in ThisBuild ++= Seq("-unchecked", "-deprecation")
36
36
37
+ lazy val defaultScalaVersion = " 2.13.0"
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-RC2 " )
40
+ lazy val supportedScalaVersions = Seq (defaultScalaVersion, " 2.12.8" , " 2.11.12" , " 2.10.7" )
40
41
41
42
val releaseVersion = " 3.1.0-SNAP11"
42
43
@@ -103,6 +104,7 @@ object ScalatestBuild {
103
104
104
105
def sharedSettings : Seq [Setting [_]] = Seq (
105
106
javaHome := getJavaHome(scalaBinaryVersion.value),
107
+ scalaVersion := defaultScalaVersion,
106
108
crossScalaVersions := supportedScalaVersions,
107
109
version := releaseVersion,
108
110
scalacOptions ++= Seq (" -feature" ),
@@ -212,15 +214,14 @@ object ScalatestBuild {
212
214
// if scala 2.13+ is used, add dependency on scala-parallel-collections module
213
215
case Some ((2 , scalaMajor)) if scalaMajor >= 13 =>
214
216
Seq (
215
- // We'll do without scala-parallel-collections until it catches up with Scala 2.13.0-M4.
216
- // "org.scala-lang.modules" %% "scala-parallel-collections" % "0.1.2",
217
+ " org.scala-lang.modules" %% " scala-parallel-collections" % " 0.1.2" ,
217
218
" org.scala-lang.modules" %%% " scala-parser-combinators" % " 1.1.2"
218
219
)
219
220
220
221
case Some ((2 , scalaMajor)) if scalaMajor >= 11 =>
221
222
Seq (" org.scala-lang.modules" %%% " scala-parser-combinators" % " 1.1.1" )
222
223
223
- case other =>
224
+ case _ =>
224
225
Seq .empty
225
226
}
226
227
}
@@ -233,7 +234,7 @@ object ScalatestBuild {
233
234
" org.scalatestplus" %% " scalatestplus-junit" % plusJUnitVersion % " test"
234
235
)
235
236
236
- val scalaJSVersion = Option (System .getenv(" SCALAJS_VERSION" )).getOrElse(" 0.6.27 " )
237
+ val scalaJSVersion = Option (System .getenv(" SCALAJS_VERSION" )).getOrElse(" 0.6.28 " )
237
238
238
239
def scalatestJSLibraryDependencies =
239
240
Seq (
@@ -726,7 +727,7 @@ object ScalatestBuild {
726
727
testOptions in Test ++=
727
728
Seq (Tests .Argument (TestFrameworks .ScalaTest , " -oDIF" )),
728
729
nativeOptimizerDriver in NativeTest := {
729
- val orig = tools. OptimizerDriver ((nativeConfig in NativeTest ).value)
730
+ val orig = Driver ((nativeConfig in NativeTest ).value)
730
731
orig.withPasses(orig.passes.filterNot(p => p == pass.DeadBlockElimination || p == pass.GlobalBoxingElimination ))
731
732
},
732
733
nativeLinkStubs in NativeTest := true ,
@@ -1446,6 +1447,7 @@ object ScalatestBuild {
1446
1447
1447
1448
def gentestsSharedSettings : Seq [Setting [_]] = Seq (
1448
1449
javaHome := getJavaHome(scalaBinaryVersion.value),
1450
+ scalaVersion := defaultScalaVersion,
1449
1451
crossScalaVersions := supportedScalaVersions,
1450
1452
scalacOptions ++= Seq (" -feature" ) ++ (if (scalaBinaryVersion.value == " 2.10" || scalaVersion.value.startsWith(" 2.13" )) Seq .empty else Seq (" -Ypartial-unification" )),
1451
1453
resolvers += " Sonatype Public" at " https://oss.sonatype.org/content/groups/public" ,
@@ -1711,11 +1713,13 @@ object ScalatestBuild {
1711
1713
1712
1714
lazy val examples = Project (" examples" , file(" examples" ))
1713
1715
.settings(
1716
+ scalaVersion := defaultScalaVersion,
1714
1717
crossScalaVersions := supportedScalaVersions
1715
1718
).dependsOn(scalacticMacro, scalactic, scalatest)
1716
1719
1717
1720
lazy val examplesJS = Project (" examplesJS" , file(" examples.js" ))
1718
1721
.settings(
1722
+ scalaVersion := defaultScalaVersion,
1719
1723
crossScalaVersions := supportedScalaVersions,
1720
1724
sourceGenerators in Test += {
1721
1725
Def .task {
0 commit comments