Skip to content

Commit b2b53af

Browse files
authored
Merge pull request #556 from ashawley/sjs0.6_2.10
Fix Scala.js 1.0 and Scala 2.10 in build
2 parents 3d283aa + c422786 commit b2b53af

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",
@@ -108,7 +111,7 @@ lazy val sharedSettings = MimaSettings.settings ++ scalaVersionSettings ++ Seq(
108111

109112
mimaPreviousArtifacts := {
110113
val isScalaJSMilestone: Boolean =
111-
Option(System.getenv("SCALAJS_VERSION")).filter(_.startsWith("1.0.0-M")).isDefined
114+
scalaJSVersion.startsWith("1.0.0-M")
112115
// TODO: re-enable MiMa for 2.14 once there is a final version
113116
if (scalaMajorVersion.value == 14 || isScalaJSMilestone) Set()
114117
else Set("org.scalacheck" %%% "scalacheck" % "1.14.1")
@@ -147,8 +150,11 @@ lazy val sharedSettings = MimaSettings.settings ++ scalaVersionSettings ++ Seq(
147150
lazy val js = project.in(file("js"))
148151
.settings(sharedSettings: _*)
149152
.settings(
150-
// remove scala 2.10 since scala.js dropped support
151-
crossScalaVersions := Seq("2.11.12", "2.12.10", scalaVersion.value),
153+
// remove scala 2.10 since scala.js 1.0 dropped support
154+
crossScalaVersions -= {
155+
if (scalaJSVersion.startsWith("1.0")) "2.10.7"
156+
else ""
157+
},
152158
scalaJSStage in Global := FastOptStage,
153159
libraryDependencies += "org.scala-js" %% "scalajs-test-interface" % scalaJSVersion
154160
)

0 commit comments

Comments
 (0)