1
1
name := " junit-4.12"
2
2
3
3
// 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
+ }
5
16
6
17
organization := (if (customBuild.value) " com.sandinh" else " org.scalatestplus" )
7
18
8
- version := " 3.1.1.0"
19
+ version := " 3.1.1.0" + versionSuffix.value
9
20
10
21
homepage := Some (url(" https://github.com/scalatest/scalatestplus-junit" ))
11
22
@@ -26,7 +37,7 @@ developers := List(
26
37
)
27
38
)
28
39
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 " )
30
41
scalaVersion := " 0.23.0-RC1"
31
42
32
43
/** Add src/main/scala-{2|3} to Compile / unmanagedSourceDirectories */
@@ -37,7 +48,8 @@ Compile / unmanagedSourceDirectories +=
37
48
})
38
49
39
50
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),
41
53
" junit" % " junit" % " 4.13"
42
54
)
43
55
Test / scalacOptions ++= (if (isDotty.value) Seq (" -language:implicitConversions" ) else Nil )
0 commit comments