summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build.sbt1
-rwxr-xr-xbuild.sc23
-rw-r--r--core/src/mill/main/RunScript.scala4
-rw-r--r--scalalib/src/mill/scalalib/ScalaModule.scala2
4 files changed, 24 insertions, 6 deletions
diff --git a/build.sbt b/build.sbt
index fa6ee4d5..837397a4 100644
--- a/build.sbt
+++ b/build.sbt
@@ -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"
diff --git a/build.sc b/build.sc
index a5eaba44..bd3cff07 100755
--- a/build.sc
+++ b/build.sc
@@ -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