From 20b41ecff45e3616544b786104358397a31a5df5 Mon Sep 17 00:00:00 2001 From: rockjam <5min4eq.unity@gmail.com> Date: Mon, 16 Apr 2018 00:25:51 +0300 Subject: [PATCH] fix cross sbt module tests --- integration/test/resources/play-json/build.sc | 6 +++--- scalalib/src/mill/scalalib/MiscModule.scala | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/integration/test/resources/play-json/build.sc b/integration/test/resources/play-json/build.sc index c60eefbac01..7b1907f8f52 100644 --- a/integration/test/resources/play-json/build.sc +++ b/integration/test/resources/play-json/build.sc @@ -143,7 +143,7 @@ abstract class PlayJson(val platformSegment: String) extends PlayJsonModule { } object playJsonJvm extends Cross[PlayJsonJvm](ScalaVersions:_*) -class PlayJsonJvm(val crossScalaVersion: String) extends PlayJson("jvm") { +class PlayJsonJvm(val crossScalaVersion: String) extends PlayJson("jvm") { outer => def moduleDeps = Seq(playFunctionalJvm(crossScalaVersion)) val jacksonVersion = "2.9.3" @@ -168,7 +168,7 @@ class PlayJsonJvm(val crossScalaVersion: String) extends PlayJson("jvm") { ) def sources = { - val docSpecs = ls.rec(millSourcePath / up / "docs" / "manual" / "working" / "scalaGuide").filter(_.isDir).filter(_.last=="code").map(PathRef(_)) + val docSpecs = ls.rec(outer.millSourcePath / up / "docs" / "manual" / "working" / "scalaGuide").filter(_.isDir).filter(_.last=="code").map(PathRef(_)) T.sources( docSpecs ++ Seq( @@ -324,7 +324,7 @@ object release extends Module { implicit val wd = pwd - val versionFile = wd / "version.sc" + val versionFile = wd / "playJsonVersion.sc" private val ReleaseVersion = raw"""(\d+)\.(\d+)\.(\d+)""".r private val MinorSnapshotVersion = raw"""(\d+)\.(\d+)\.(\d+)-SNAPSHOT""".r diff --git a/scalalib/src/mill/scalalib/MiscModule.scala b/scalalib/src/mill/scalalib/MiscModule.scala index 24a0356ccca..1d44964e478 100644 --- a/scalalib/src/mill/scalalib/MiscModule.scala +++ b/scalalib/src/mill/scalalib/MiscModule.scala @@ -86,12 +86,12 @@ trait CrossSbtModule extends SbtModule with CrossModuleBase{ outer => } trait Tests extends super.Tests { - override def millSourcePath = outer.millSourcePath + override def millSourcePath = outer.millSourcePath / 'src / 'test override def sources = T.sources{ super.sources() ++ CrossModuleBase.scalaVersionPaths( crossScalaVersion, - s => millSourcePath / 'src / 'test / s"scala-$s" + s => millSourcePath / s"scala-$s" ) } }