@@ -27,15 +27,47 @@ class MillBuildToolSuite extends BaseBuildToolSuite {
27
27
List (" ./mill" , " --version" )
28
28
}
29
29
30
- List (" 0.10.0" ).foreach { version =>
30
+ def scalaLibrary (scalaVersion : String ) =
31
+ if (scalaVersion.startsWith(" 3" ))
32
+ List (
33
+ " maven:org.scala-lang:scala-library:2.13.8" ,
34
+ " maven:org.scala-lang:scala3-library_3:3.1.3"
35
+ ).mkString(" \n " )
36
+ else if (scalaVersion.startsWith(" 2.13" ))
37
+ " maven:org.scala-lang:scala-library:2.13.8"
38
+ else if (scalaVersion.startsWith(" 2.12" ))
39
+ " maven:org.scala-lang:scala-library:2.12.16"
40
+ else
41
+ " idn fail, we don't cover this scala version"
42
+
43
+ def scalaBinaryVersion (scalaVersion : String ) =
44
+ if (scalaVersion.startsWith(" 3" ))
45
+ " 3"
46
+ else if (scalaVersion.startsWith(" 2.13" ))
47
+ " 2.13"
48
+ else if (scalaVersion.startsWith(" 2.12" ))
49
+ " 2.12"
50
+ else
51
+ " idn fail, we don't cover this scala version"
52
+
53
+ val supportedMillVersions = List (" 0.10.0" )
54
+ val supportedScalaVersion = List (" 2.12.16" , " 2.13.8" , " 3.1.3" )
55
+
56
+ val testGroupings =
57
+ for {
58
+ millVersion <- supportedMillVersions
59
+ scalaVersion <- supportedScalaVersion
60
+ } yield (millVersion, scalaVersion)
61
+
62
+ testGroupings.foreach { case (millVersion, scalaVersion) =>
31
63
checkBuild(
32
- s " minimal " ,
64
+ s " minimal- ${millVersion} - ${scalaVersion} " ,
33
65
s """ |/.mill-version
34
- | ${version }
66
+ | ${millVersion }
35
67
|/build.sc
36
68
|import mill._, scalalib._
37
69
|object minimal extends ScalaModule {
38
- | def scalaVersion = "2.13.8 "
70
+ | def scalaVersion = " ${scalaVersion} "
39
71
| object test extends Tests with TestModule.Munit {
40
72
| def ivyDeps = Agg(ivy"org.scalameta::munit:1.0.0-M6")
41
73
| }
@@ -53,13 +85,13 @@ class MillBuildToolSuite extends BaseBuildToolSuite {
53
85
| """ .stripMargin,
54
86
expectedSemanticdbFiles = 2 ,
55
87
expectedPackages =
56
- """ |maven:junit:junit:4.13.2
57
- |maven:org.hamcrest:hamcrest-core:1.3
58
- |maven:org.scala-lang:scala-library:2.13.8
59
- |maven:org.scala-sbt:test-interface:1.0
60
- |maven:org.scalameta:junit-interface:1.0.0-M6
61
- |maven:org.scalameta:munit_2.13 :1.0.0-M6
62
- |""" .stripMargin,
88
+ s """ |maven:junit:junit:4.13.2
89
+ |maven:org.hamcrest:hamcrest-core:1.3
90
+ | ${scalaLibrary(scalaVersion)}
91
+ |maven:org.scala-sbt:test-interface:1.0
92
+ |maven:org.scalameta:junit-interface:1.0.0-M6
93
+ |maven:org.scalameta:munit_ ${scalaBinaryVersion(scalaVersion)} :1.0.0-M6
94
+ | """ .stripMargin,
63
95
initCommand = setupMill(),
64
96
targetRoot = Some (" out/io/kipp/mill/scip/Scip/generate.dest" )
65
97
)
0 commit comments