Skip to content

Commit

Permalink
fix cross sbt module tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rockjam committed Apr 15, 2018
1 parent a145abc commit 20b41ec
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions integration/test/resources/play-json/build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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(
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions scalalib/src/mill/scalalib/MiscModule.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
}
}
Expand Down

0 comments on commit 20b41ec

Please sign in to comment.