|
1 | 1 | import mill._, scalalib._, scalajslib._, scalanativelib._, publish._
|
2 | 2 | import $ivy.`de.tototec::de.tobiasroeser.mill.vcs.version::0.1.4`
|
3 | 3 | import de.tobiasroeser.mill.vcs.version.VcsVersion
|
4 |
| -import $ivy.`com.github.lolgab::mill-mima::0.0.9` |
| 4 | +import $ivy.`com.github.lolgab::mill-mima::0.0.10` |
5 | 5 | import com.github.lolgab.mill.mima._
|
| 6 | +import mill.scalalib.api.Util.isScala3 |
6 | 7 |
|
7 |
| -val dottyVersions = sys.props.get("dottyVersion").toList |
| 8 | +val dottyCommunityBuildVersion = sys.props.get("dottyVersion").toList |
8 | 9 |
|
9 |
| -val scala2VersionsAndDotty = "2.11.12" :: "2.12.13" :: "2.13.4" :: dottyVersions |
10 |
| -val scala30 = "3.0.0" |
| 10 | +val scalaVersions = |
| 11 | + "2.11.12" :: "2.12.16" :: "2.13.8" :: "3.1.3" :: dottyCommunityBuildVersion |
11 | 12 |
|
12 |
| -val scalaJSVersions = for { |
13 |
| - scalaV <- scala30 :: scala2VersionsAndDotty |
14 |
| - scalaJSV <- Seq("0.6.33", "1.5.1") |
15 |
| - if scalaV.startsWith("2.") || scalaJSV.startsWith("1.") |
16 |
| -} yield (scalaV, scalaJSV) |
| 13 | +val scalaJSVersions = scalaVersions.map((_, "1.10.1")) |
| 14 | +val scalaNativeVersions = scalaVersions.map((_, "0.4.5")) |
17 | 15 |
|
18 |
| -val scalaNativeVersions = for { |
19 |
| - scalaV <- "3.1.0" :: scala2VersionsAndDotty |
20 |
| - scalaNativeV <- Seq("0.4.3") |
21 |
| -} yield (scalaV, scalaNativeV) |
| 16 | +trait MimaCheck extends Mima { |
| 17 | + def mimaPreviousVersions = VcsVersion.vcsState().lastTag.toSeq |
| 18 | +} |
22 | 19 |
|
23 |
| -trait SourcecodeModule extends PublishModule with Mima { |
| 20 | +trait SourcecodeModule extends PublishModule with MimaCheck { |
24 | 21 | def artifactName = "sourcecode"
|
25 | 22 |
|
26 | 23 | def publishVersion = VcsVersion.vcsState().format()
|
27 | 24 |
|
28 |
| - def mimaPreviousVersions = VcsVersion.vcsState().lastTag.toSeq |
| 25 | + def crossScalaVersion: String |
| 26 | + |
| 27 | + // Temporary until the next version of Mima gets released with |
| 28 | + // https://github.com/lightbend/mima/issues/693 included in the release. |
| 29 | + def mimaPreviousArtifacts = |
| 30 | + if(isScala3(crossScalaVersion)) Agg.empty[Dep] else super.mimaPreviousArtifacts() |
29 | 31 |
|
30 | 32 | def pomSettings = PomSettings(
|
31 | 33 | description = artifactName(),
|
32 | 34 | organization = "com.lihaoyi",
|
33 |
| - url = "https://github.com/lihaoyi/sourcecode", |
| 35 | + url = "https://github.com/com-lihaoyi/sourcecode", |
34 | 36 | licenses = Seq(License.MIT),
|
35 | 37 | versionControl = VersionControl.github(owner = "com-lihaoyi", repo = "sourcecode"),
|
36 | 38 | developers = Seq(
|
@@ -82,7 +84,7 @@ trait SourcecodeTestModule extends ScalaModule {
|
82 | 84 | }
|
83 | 85 |
|
84 | 86 | object sourcecode extends Module {
|
85 |
| - object jvm extends Cross[JvmSourcecodeModule](scala30 :: scala2VersionsAndDotty: _*) |
| 87 | + object jvm extends Cross[JvmSourcecodeModule](scalaVersions: _*) |
86 | 88 | class JvmSourcecodeModule(val crossScalaVersion: String)
|
87 | 89 | extends SourcecodeMainModule with ScalaModule with SourcecodeModule {
|
88 | 90 |
|
|
0 commit comments