diff options
Diffstat (limited to 'integration')
4 files changed, 19 insertions, 17 deletions
diff --git a/integration/src/test/resource/acyclic/build.sc b/integration/src/test/resource/acyclic/build.sc index 603f8f06..ec338e9f 100644 --- a/integration/src/test/resource/acyclic/build.sc +++ b/integration/src/test/resource/acyclic/build.sc @@ -1,9 +1,10 @@ import mill.define.Cross +import mill.CrossModule import mill.scalalib.{SbtModule, PublishModule, Dep} import mill.scalalib.publish.{PomSettings, License, Developer, SCM} -val acyclic = for{ - crossVersion <- Cross("2.10.6", "2.11.8", "2.12.3", "2.12.4") -} yield new SbtModule with PublishModule {outer => + +object acyclic extends CrossModule(AcyclicModule, "2.10.6", "2.11.8", "2.12.3", "2.12.4") +case class AcyclicModule(crossVersion: String) extends SbtModule with PublishModule { def basePath = ammonite.ops.pwd / 'target / 'workspace / 'acyclic def artifactName = "acyclic" def publishVersion = "0.1.7" @@ -28,7 +29,7 @@ val acyclic = for{ def ivyDeps = Seq( Dep.Java("org.scala-lang", "scala-compiler", scalaVersion()) ) - object test extends this.Tests{ + object test extends Tests{ def forkWorkingDir = ammonite.ops.pwd / 'target / 'workspace / 'acyclic def ivyDeps = Seq( Dep("com.lihaoyi", "utest", "0.6.0") diff --git a/integration/src/test/resource/better-files/build.sc b/integration/src/test/resource/better-files/build.sc index 2b3f7473..bfb7f89c 100644 --- a/integration/src/test/resource/better-files/build.sc +++ b/integration/src/test/resource/better-files/build.sc @@ -1,7 +1,8 @@ import mill.define.Cross import mill.scalalib.{SbtModule, PublishModule, Dep} import mill.scalalib.publish.{PomSettings, License, Developer, SCM} -trait BetterFilesModule extends SbtModule{ outer => + +trait BetterFilesModule extends SbtModule{ def scalaVersion = "2.12.4" def scalacOptions = Seq( "-deprecation", // Emit warning and location for usages of deprecated APIs. @@ -51,27 +52,31 @@ trait BetterFilesModule extends SbtModule{ outer => "-Ywarn-value-discard" // Warn when non-Unit expression results are unused. ) override def javacOptions = Seq("-source", "1.8", "-target", "1.8", "-Xlint") - object test extends this.Tests{ + object test extends Tests{ def projectDeps = - if (this == core.test) Seq(core) - else Seq(outer, core.test) + if (this == core.test) super.projectDeps + else super.projectDeps ++ Seq(core.test) def ivyDeps = Seq(Dep("org.scalatest", "scalatest", "3.0.4")) def testFramework = "org.scalatest.tools.Framework" } } + object core extends BetterFilesModule{ def basePath = ammonite.ops.pwd / 'target / 'workspace / "better-files" / 'core } + object akka extends BetterFilesModule{ def projectDeps = Seq(core) def basePath = ammonite.ops.pwd / 'target / 'workspace / "better-files" / 'akka def ivyDeps = Seq(Dep("com.typesafe.akka", "akka-actor", "2.5.6")) } + object shapelessScanner extends BetterFilesModule{ def projectDeps = Seq(core) def basePath = ammonite.ops.pwd / 'target / 'workspace / "better-files" / 'shapeless def ivyDeps = Seq(Dep("com.chuusai", "shapeless", "2.3.2")) } + object benchmarks extends BetterFilesModule{ def projectDeps = Seq(core) def basePath = ammonite.ops.pwd / 'target / 'workspace / "better-files" / 'benchmarks diff --git a/integration/src/test/resource/jawn/build.sc b/integration/src/test/resource/jawn/build.sc index 60faf70b..75dfeaa1 100644 --- a/integration/src/test/resource/jawn/build.sc +++ b/integration/src/test/resource/jawn/build.sc @@ -1,11 +1,10 @@ import mill.scalalib -import mill.define.Cross +import mill.CrossModule import mill.scalalib.{Dep, TestModule, Module} -val jawn = for{ - crossVersion <- Cross("2.10.6", "2.11.11", "2.12.3") -} yield new mill.Module{ - trait JawnModule extends scalalib.SbtModule{ outer => +object jawn extends CrossModule(JawnModule, "2.10.6", "2.11.11", "2.12.3") +case class JawnModule(crossVersion: String) extends mill.Module{ + trait JawnModule extends scalalib.SbtModule{ def scalaVersion = crossVersion def scalacOptions = Seq( "-deprecation", @@ -13,7 +12,7 @@ val jawn = for{ "-unchecked" ) def testProjectDeps: Seq[TestModule] = Nil - object test extends this.Tests{ + object test extends Tests{ def projectDeps = super.projectDeps ++ testProjectDeps def ivyDeps = Seq( Dep("org.scalatest", "scalatest", "3.0.3"), diff --git a/integration/src/test/scala/mill/integration/AcyclicTests.scala b/integration/src/test/scala/mill/integration/AcyclicTests.scala index cd7209d5..42b5179b 100644 --- a/integration/src/test/scala/mill/integration/AcyclicTests.scala +++ b/integration/src/test/scala/mill/integration/AcyclicTests.scala @@ -28,7 +28,4 @@ object AcyclicTests extends IntegrationTestSuite("MILL_ACYCLIC_REPO", "acyclic") 'scala2124 - check("2.12.4") } - def main(args: Array[String]): Unit = { - println("Integration Main") - } } |