-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sc
70 lines (57 loc) · 2.04 KB
/
build.sc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import mill._
import mill.scalalib._
import publish._
import $ivy.`de.tototec::de.tobiasroeser.mill.integrationtest:0.3.3`
import de.tobiasroeser.mill.integrationtest._
import scala.collection.immutable.ListMap
trait Deps {
def millVersion = "0.7.0"
def scalaVersion = "2.13.2"
val millMain = ivy"com.lihaoyi::mill-main:${millVersion}"
val millScalalib = ivy"com.lihaoyi::mill-scalalib:${millVersion}"
}
object Deps_0_7 extends Deps
object Deps_0_6 extends Deps {
override def millVersion = "0.6.0"
override def scalaVersion = "2.12.10"
}
val millApiVersions: Map[String, Deps] = ListMap(
"0.7" -> Deps_0_7,
"0.6" -> Deps_0_6
)
val millItestVersions = Seq(
"0.7.4", "0.7.3", "0.7.2", "0.7.1", "0.7.0",
"0.6.3", "0.6.2", "0.6.1", "0.6.0"
)
object `mill-antlr` extends mill.Cross[`mill-antlrCross`](millApiVersions.keysIterator.toSeq: _*)
class `mill-antlrCross`(val millApiVersion: String) extends CrossScalaModule with PublishModule {
def deps: Deps = millApiVersions(millApiVersion)
override def crossScalaVersion = deps.scalaVersion
override def compileIvyDeps = Agg(
deps.millMain,
deps.millScalalib,
)
def millSourcePath = os.pwd
def ivyDeps = Agg(
ivy"org.antlr:antlr4:4.8-1",
)
def publishVersion = "0.1.0"
def artifactName = "mill-antlr"
def pomSettings = PomSettings(
description = "Antlr support for mill builds.",
organization = "net.mlbox",
url = "https://github.com/ml86/mill-antlr",
licenses = Seq(License.MIT),
versionControl = VersionControl.github("ml86", "mill-antlr"),
developers = Seq(
Developer("ml86", "Markus Lottmann", "https://github.com/ml86")
)
)
}
object itest extends Cross[ItestCross](millItestVersions: _*)
class ItestCross(millItestVersion: String) extends MillIntegrationTestModule {
val millApiVersion = millItestVersion.split("[.]").take(2).mkString(".")
override def millSourcePath: os.Path = super.millSourcePath / os.up
override def millTestVersion = millItestVersion
override def pluginsUnderTest = Seq(`mill-antlr`(millApiVersion))
}