diff options
-rw-r--r-- | build.sbt | 1 | ||||
-rwxr-xr-x | build.sc | 23 | ||||
-rw-r--r-- | core/src/mill/main/RunScript.scala | 4 | ||||
-rw-r--r-- | scalalib/src/mill/scalalib/ScalaModule.scala | 2 |
4 files changed, 24 insertions, 6 deletions
@@ -123,6 +123,7 @@ lazy val core = project lazy val moduledefs = project .settings( sharedSettings, + name := "mill-moduledefs", libraryDependencies ++= Seq( "org.scala-lang" % "scala-compiler" % scalaVersion.value, "com.lihaoyi" %% "sourcecode" % "0.1.4" @@ -7,16 +7,33 @@ import mill._ import mill.scalalib._, publish._ import mill.modules.Jvm.createAssembly -object moduledefs extends ScalaModule{ +trait MillPublishModule extends PublishModule{ def scalaVersion = "2.12.4" + def artifactName = "mill-" + super.artifactName() + def pomSettings = PomSettings( + description = artifactName(), + organization = "com.lihaoyi", + url = "https://github.com/lihaoyi/mill", + licenses = Seq( + License("MIT license", "http://www.opensource.org/licenses/mit-license.php") + ), + scm = SCM( + "git://github.com/lihaoyi/mill.git", + "scm:git://github.com/lihaoyi/mill.git" + ), + developers = Seq( + Developer("lihaoyi", "Li Haoyi","https://github.com/lihaoyi") + ) + ) +} +object moduledefs extends MillPublishModule{ def ivyDeps = Agg( ivy"org.scala-lang:scala-compiler:${scalaVersion()}", ivy"com.lihaoyi::sourcecode:0.1.4" ) } -trait MillModule extends ScalaModule{ outer => - def scalaVersion = "2.12.4" +trait MillModule extends MillPublishModule{ outer => def compileIvyDeps = Agg(ivy"com.lihaoyi::acyclic:0.1.7") def scalacOptions = Seq("-P:acyclic:force") diff --git a/core/src/mill/main/RunScript.scala b/core/src/mill/main/RunScript.scala index b4de2966..29ba09dd 100644 --- a/core/src/mill/main/RunScript.scala +++ b/core/src/mill/main/RunScript.scala @@ -184,7 +184,7 @@ object RunScript{ evaluated.failing.keyCount match { case 0 => - val json = for(t <- targets) yield { + val json = for(t <- targets.toSeq) yield { t match { case t: mill.define.NamedTask[_] => val jsonFile = Evaluator @@ -197,7 +197,7 @@ object RunScript{ } } - watched -> Right(evaluated.values.zip(json.toSeq)) + watched -> Right(evaluated.values.zip(json)) case n => watched -> Left(s"$n targets failed\n$errorStr") } } diff --git a/scalalib/src/mill/scalalib/ScalaModule.scala b/scalalib/src/mill/scalalib/ScalaModule.scala index 848e0318..b79b32dc 100644 --- a/scalalib/src/mill/scalalib/ScalaModule.scala +++ b/scalalib/src/mill/scalalib/ScalaModule.scala @@ -192,7 +192,7 @@ trait ScalaModule extends mill.Module with TaskModule { outer => mkdir(javadocDir) val files = for{ - ref <- sources() + ref <- allSources() if exists(ref.path) p <- ls.rec(ref.path) if p.isFile |