Skip to content

Commit f15244a

Browse files
committed
dotty 0.24.0-bin-20200324-6cd3a9d-NIGHTLY
1 parent ab2227d commit f15244a

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

build.sbt

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,22 @@
11
name := "junit-4.12"
22

33
// need this because scalatest is not published for dotty 0.23 yet
4-
val customBuild = Def.setting { scalaVersion.value.startsWith("0.23.") }
4+
val customBuild = Def.setting {
5+
CrossVersion.partialVersion(scalaVersion.value) match {
6+
case Some((0, n)) if n > 23 => true
7+
case _ => false
8+
}
9+
}
10+
lazy val versionSuffix = Def.setting {
11+
val sv = scalaVersion.value
12+
val isDottyNightly = isDotty.value && sv.length > 10 // // "0.xx.0-bin".length
13+
if (isDottyNightly) "-dotty" + sv.substring(10)
14+
else ""
15+
}
516

617
organization := (if (customBuild.value) "com.sandinh" else "org.scalatestplus")
718

8-
version := "3.1.1.0"
19+
version := "3.1.1.0" + versionSuffix.value
920

1021
homepage := Some(url("https://github.com/scalatest/scalatestplus-junit"))
1122

@@ -26,7 +37,7 @@ developers := List(
2637
)
2738
)
2839

29-
crossScalaVersions := List("2.10.7", "2.11.12", "2.12.11", "2.13.1", "0.22.0-RC1", "0.23.0-RC1")
40+
crossScalaVersions := List("2.10.7", "2.11.12", "2.12.11", "2.13.1", "0.22.0-RC1", "0.23.0-RC1", "0.24.0-bin-20200324-6cd3a9d-NIGHTLY")
3041
scalaVersion := "0.23.0-RC1"
3142

3243
/** Add src/main/scala-{2|3} to Compile / unmanagedSourceDirectories */
@@ -37,7 +48,8 @@ Compile / unmanagedSourceDirectories +=
3748
})
3849

3950
libraryDependencies ++= Seq(
40-
(if (customBuild.value) "com.sandinh" else "org.scalatest") %% "scalatest" % "3.1.1",
51+
(if (customBuild.value) "com.sandinh"
52+
else "org.scalatest") %% "scalatest" % ("3.1.1" + versionSuffix.value),
4153
"junit" % "junit" % "4.13"
4254
)
4355
Test / scalacOptions ++= (if (isDotty.value) Seq("-language:implicitConversions") else Nil)

0 commit comments

Comments
 (0)