diff options
Diffstat (limited to 'build.sc')
-rwxr-xr-x | build.sc | 39 |
1 files changed, 19 insertions, 20 deletions
@@ -10,17 +10,17 @@ import mill.modules.Jvm.createAssembly object moduledefs extends SbtModule{ def scalaVersion = "2.12.4" def ivyDeps = Agg( - Dep.Java("org.scala-lang", "scala-compiler", scalaVersion()), - Dep("com.lihaoyi", "sourcecode", "0.1.4") + ivy"org.scala-lang:scala-compiler:${scalaVersion()}", + ivy"com.lihaoyi::sourcecode:0.1.4" ) } trait MillModule extends SbtModule{ outer => def scalaVersion = "2.12.4" - def compileIvyDeps = Agg(Dep("com.lihaoyi", "acyclic", "0.1.7")) + def compileIvyDeps = Agg(ivy"com.lihaoyi::acyclic:0.1.7") def scalacOptions = Seq("-P:acyclic:force") - def scalacPluginIvyDeps = Agg(Dep("com.lihaoyi", "acyclic", "0.1.7")) + def scalacPluginIvyDeps = Agg(ivy"com.lihaoyi::acyclic:0.1.7") def repositories = super.repositories ++ Seq( MavenRepository("https://oss.sonatype.org/content/repositories/releases") @@ -32,29 +32,28 @@ trait MillModule extends SbtModule{ outer => class Tests(ctx0: mill.define.Ctx) extends mill.Module()(ctx0) with super.Tests{ def defaultCommandName() = "forkTest" def forkArgs = T{ testArgs() } - def projectDeps = + def moduleDeps = if (this == core.test) Seq(core) else Seq(outer, core.test) - def ivyDeps = Agg(Dep("com.lihaoyi", "utest", "0.6.0")) + def ivyDeps = Agg(ivy"com.lihaoyi::utest:0.6.0") def testFramework = "mill.UTestFramework" def scalacPluginClasspath = super.scalacPluginClasspath() ++ Seq(moduledefs.jar()) } } object core extends MillModule { - def projectDeps = Seq(moduledefs) + def moduleDeps = Seq(moduledefs) def compileIvyDeps = Agg( - Dep.Java("org.scala-lang", "scala-reflect", scalaVersion()) + ivy"org.scala-lang:scala-reflect:${scalaVersion()}" ) def ivyDeps = Agg( - Dep("com.lihaoyi", "sourcecode", "0.1.4"), - Dep("com.lihaoyi", "pprint", "0.5.3"), - Dep.Point("com.lihaoyi", "ammonite", "1.0.3-21-05b5d32"), - Dep("com.typesafe.play", "play-json", "2.6.6"), - Dep("org.scala-sbt", "zinc", "1.0.5"), - Dep.Java("org.scala-sbt", "test-interface", "1.0") + ivy"com.lihaoyi::sourcecode:0.1.4", + ivy"com.lihaoyi::pprint:0.5.3", + ivy"com.lihaoyi:::ammonite:1.0.3-21-05b5d32", + ivy"org.scala-sbt::zinc:1.0.5", + ivy"org.scala-sbt:test-interface:1.0" ) def generatedSources = T { @@ -85,8 +84,8 @@ class BridgeModule(crossVersion: String) extends PublishModule { Agg(PathRef(shared.downloadBridgeSource(T.ctx().dest, crossVersion))) } def ivyDeps = Agg( - Dep.Java("org.scala-lang", "scala-compiler", crossVersion), - Dep.Java("org.scala-sbt", "compiler-interface", "1.0.5") + ivy"org.scala-lang:scala-compiler:$crossVersion", + ivy"org.scala-sbt:compiler-interface:1.0.5" ) def publishWithFullScalaVersion = true @@ -102,7 +101,7 @@ class BridgeModule(crossVersion: String) extends PublishModule { } object scalalib extends MillModule { - def projectDeps = Seq(core) + def moduleDeps = Seq(core) def bridgeCompiles = mill.define.Task.traverse(bridges.items)(_._2.compile) def testArgs = T{ @@ -120,7 +119,7 @@ object scalalib extends MillModule { object scalajslib extends MillModule { - def projectDeps = Seq(scalalib) + def moduleDeps = Seq(scalalib) def bridgeClasspath(runDepClasspath: Agg[PathRef], classes: PathRef) = (runDepClasspath ++ Agg(classes)).map(_.path).mkString(File.pathSeparator) @@ -139,7 +138,7 @@ object scalajslib extends MillModule { case "1.0" => "1.0.0-M2" } def ivyDeps = Agg( - Dep("org.scala-js", "scalajs-tools", scalajsVersion) + ivy"org.scala-js::scalajs-tools:$scalajsVersion" ) } } @@ -155,7 +154,7 @@ def testRepos = T{ } object integration extends MillModule{ - def projectDeps = Seq(moduledefs, scalalib, scalajslib) + def moduleDeps = Seq(moduledefs, scalalib, scalajslib) def testArgs = T{ for((k, v) <- testRepos()) yield s"-D$k=$v" } |