-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sc
54 lines (47 loc) · 2.02 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
import mill._, scalalib._
import mill.scalalib.publish._
import mill.scalalib.api.Util.scalaNativeBinaryVersion
import $ivy.`de.tototec::de.tobiasroeser.mill.integrationtest::0.6.1`
import de.tobiasroeser.mill.integrationtest._
import $ivy.`de.tototec::de.tobiasroeser.mill.vcs.version::0.2.0`
import de.tobiasroeser.mill.vcs.version.VcsVersion
val millVersions = Seq("0.10.0", "0.11.0-M6")
val millBinaryVersions = millVersions.map(scalaNativeBinaryVersion)
def millBinaryVersion(millVersion: String) = scalaNativeBinaryVersion(
millVersion
)
def millVersion(binaryVersion: String) =
millVersions.find(v => millBinaryVersion(v) == binaryVersion).get
object jbuildinfo extends Cross[JBuildInfoModule](millBinaryVersions: _*)
class JBuildInfoModule(val millBinaryVersion: String) extends ScalaModule with PublishModule {
def artifactName = s"jbuildinfo_mill$millBinaryVersion"
def millSourcePath = super.millSourcePath / os.up
def scalaVersion = BuildInfo.scalaVersion
def publishVersion = VcsVersion.vcsState().format()
override def ivyDeps = Agg(
ivy"com.lihaoyi::mill-scalalib:${millVersion(millBinaryVersion)}"
)
def pomSettings = PomSettings(
description = "mill jbuildinfo",
organization = "com.github.carueda",
url = "https://github.com/carueda/mill-jbuildinfo",
licenses = Seq(License.`Apache-2.0`),
versionControl = VersionControl.github("carueda", "mill-jbuildinfo"),
developers = Seq(
Developer("carueda", "Carlos Rueda", "https://github.com/carueda"),
Developer("lolgab", "Lorenzo Gabriele", "https://github.com/lolgab")
)
)
override def scalacOptions = Seq(
"-deprecation", "-feature", "-encoding", "utf8"
)
}
object itest extends Cross[itestCross]("0.10.0", "0.10.10", "0.11.0-M6")
class itestCross(millVersion: String) extends MillIntegrationTestModule {
override def millSourcePath = super.millSourcePath / os.up
def millTestVersion = millVersion
def pluginsUnderTest = Seq(
jbuildinfo(millBinaryVersion(millVersion))
)
def testBase = millSourcePath / "src"
}