Skip to content

Commit 91c6999

Browse files
ashawleynon
authored andcommitted
Fix Scala.js 1.0 and Scala 2.10 in build
1 parent b325418 commit 91c6999

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

build.sbt

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ lazy val scalaVersionSettings = Seq(
2121
}
2222
)
2323

24+
lazy val scalaJSVersion =
25+
Option(System.getenv("SCALAJS_VERSION")).getOrElse("0.6.29")
26+
2427
lazy val sharedSettings = MimaSettings.settings ++ scalaVersionSettings ++ Seq(
2528

2629
name := "scalacheck",
@@ -106,7 +109,7 @@ lazy val sharedSettings = MimaSettings.settings ++ scalaVersionSettings ++ Seq(
106109

107110
mimaPreviousArtifacts := {
108111
val isScalaJSMilestone: Boolean =
109-
Option(System.getenv("SCALAJS_VERSION")).filter(_.startsWith("1.0.0-M")).isDefined
112+
scalaJSVersion.startsWith("1.0.0-M")
110113
// TODO: re-enable MiMa for 2.14 once there is a final version
111114
if (scalaMajorVersion.value == 14 || isScalaJSMilestone) Set()
112115
else Set("org.scalacheck" %%% "scalacheck" % "1.14.0")
@@ -145,8 +148,11 @@ lazy val sharedSettings = MimaSettings.settings ++ scalaVersionSettings ++ Seq(
145148
lazy val js = project.in(file("js"))
146149
.settings(sharedSettings: _*)
147150
.settings(
148-
// remove scala 2.10 since scala.js dropped support
149-
crossScalaVersions := Seq("2.11.12", "2.12.9", scalaVersion.value),
151+
// remove scala 2.10 since scala.js 1.0 dropped support
152+
crossScalaVersions -= {
153+
if (scalaJSVersion.startsWith("1.0")) "2.10.7"
154+
else ""
155+
},
150156
scalaJSStage in Global := FastOptStage,
151157
libraryDependencies += "org.scala-js" %% "scalajs-test-interface" % scalaJSVersion
152158
)

0 commit comments

Comments
 (0)