From b3a696f8b32cf1d3a8bf75b480a6e962cbb5adff Mon Sep 17 00:00:00 2001 From: Tobias Roeser Date: Fri, 17 Sep 2021 22:00:43 +0200 Subject: [PATCH] Added support for mill 0.10.0-M2 (#37) * Updated Download Matrix * Update mill-integrationtest version to 0.4.1-16-63f11c Pull request: https://github.com/lefou/mill-vcs-version/pull/37 --- README.adoc | 9 +++++++-- build.sc | 31 +++++++++++++++---------------- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/README.adoc b/README.adoc index f7d7adc..5620965 100644 --- a/README.adoc +++ b/README.adoc @@ -72,7 +72,8 @@ Please make sure to use the correct _mill platform suffix_ matching your used mi [options="header"] |=== | mill version | mill platform | suffix | example -| 0.9.3 - | 0.9 | `_mill0.9` | ```$ivy.`de.tototec::de.tobiasroeser.mill.vcs.version_mill0.9:{version}```` +| 0.10.0-M2 | 0.10.0-M2 | `_mill0.10.0-M2` | ```$ivy.`de.tototec::de.tobiasroeser.mill.vcs.version_mill0.10.0-M2:{version}```` +| 0.9.3 - 0.9.9 | 0.9 | `_mill0.9` | ```$ivy.`de.tototec::de.tobiasroeser.mill.vcs.version_mill0.9:{version}```` | 0.7.0 - 0.8.0 | 0.7 | `_mill0.7` | ```$ivy.`de.tototec::de.tobiasroeser.mill.vcs.version_mill0.7:{version}```` | 0.6.0 - 0.6.3 | 0.6 | `_mill0.6` | ```$ivy.`de.tototec::de.tobiasroeser.mill.vcs.version_mill0.6:{version}```` |=== @@ -106,7 +107,11 @@ Contributing:: == Releases / Changelog -=== mill-vsc-version 0.1.1 - 2020-01-21 +=== main + +* Added support for mill 0.10.0-M2 + +=== mill-vsc-version 0.1.1 - 2021-01-21 * Fixed handling of repos without any (previous) tag diff --git a/build.sc b/build.sc index a934713..337ff34 100644 --- a/build.sc +++ b/build.sc @@ -1,6 +1,6 @@ // mill plugins import $ivy.`de.tototec::de.tobiasroeser.mill.vcs.version_mill0.9:0.1.1` -import $ivy.`de.tototec::de.tobiasroeser.mill.integrationtest_mill0.9:0.4.1` +import $ivy.`de.tototec::de.tobiasroeser.mill.integrationtest_mill0.9:0.4.1-16-63f11c` import $ivy.`com.lihaoyi::mill-contrib-scoverage:$MILL_VERSION` import mill._ import mill.contrib.scoverage.ScoverageModule @@ -30,26 +30,32 @@ trait Deps { val slf4j = ivy"org.slf4j:slf4j-api:1.7.25" } +object Deps_0_10_0_M2 extends Deps { + override def millPlatform = "0.10.0-M2" + override def millVersion = "0.10.0-M2" // scala-steward:off + override def scalaVersion = "2.13.6" + override def testWithMill = Seq(millVersion) +} object Deps_0_9 extends Deps { override def millPlatform = "0.9" override def millVersion = "0.9.3" // scala-steward:off override def scalaVersion = "2.13.6" - override def testWithMill = Seq("0.9.8", "0.9.7", "0.9.6", "0.9.5", "0.9.4", "0.9.3") + override def testWithMill = Seq("0.9.9", "0.9.8", "0.9.7", "0.9.6", "0.9.5", "0.9.4", millVersion) } object Deps_0_7 extends Deps { override def millPlatform = "0.7" override def millVersion = "0.7.0" // scala-steward:off override def scalaVersion = "2.13.6" - override def testWithMill = Seq("0.8.0", "0.7.4", "0.7.3", "0.7.2", "0.7.1", "0.7.0") + override def testWithMill = Seq("0.8.0", "0.7.4", "0.7.3", "0.7.2", "0.7.1", millVersion) } object Deps_0_6 extends Deps { override def millPlatform = "0.6" override def millVersion = "0.6.0" // scala-steward:off override def scalaVersion = "2.12.15" - override def testWithMill = Seq("0.6.3", "0.6.2", "0.6.1", "0.6.0") + override def testWithMill = Seq("0.6.3", "0.6.2", "0.6.1", millVersion) } -val crossDeps = Seq(Deps_0_9, Deps_0_7, Deps_0_6) +val crossDeps = Seq(Deps_0_10_0_M2, Deps_0_9, Deps_0_7, Deps_0_6) val millApiVersions = crossDeps.map(x => x.millPlatform -> x) val millItestVersions = crossDeps.flatMap(x => x.testWithMill.map(_ -> x)) @@ -103,9 +109,8 @@ class CoreCross(override val millApiVersion: String) extends BaseModule { deps.millScalalib ) - object test extends Tests { + object test extends Tests with TestModule.ScalaTest { override def ivyDeps = Agg(deps.scalaTest) - def testFrameworks = Seq("org.scalatest.tools.Framework") } } @@ -146,17 +151,11 @@ class ItestCross(millItestVersion: String) extends MillIntegrationTestModule { } override def perTestResources = T.sources { Seq(generatedSharedSrc()) } - def generatedSharedSrc = T{ + def generatedSharedSrc = T { os.write( T.dest / "shared.sc", - s"""import $$ivy.`${ - deps.scoverageRuntime.dep.module.organization.value - }::${ - deps.scoverageRuntime.dep.module.name.value - }:${ - deps.scoverageRuntime.dep.version - }` - |""".stripMargin + s"""import $$ivy.`${deps.scoverageRuntime.dep.module.organization.value}::${deps.scoverageRuntime.dep.module.name.value}:${deps.scoverageRuntime.dep.version}` + |""".stripMargin ) PathRef(T.dest) }