summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml2
-rw-r--r--docs/pages/1 - Intro to Mill.md8
-rw-r--r--scalalib/src/mill/scalalib/ScalaModule.scala10
-rw-r--r--scalaworker/src/mill/scalaworker/ScalaWorker.scala7
4 files changed, 15 insertions, 12 deletions
diff --git a/.travis.yml b/.travis.yml
index 4c9581a1..04f1bfc2 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -19,7 +19,7 @@ matrix:
- stage: build
env: CI_SCRIPT=ci/test-mill-release.sh
- stage: release
- env: CI_SCRIPT="ci/on-master.py ci/release.py"
+ env: CI_SCRIPT="ci/on-master.py ci/release.sh"
- stage: release
env: CI_SCRIPT="ci/on-master.py ci/publish-docs.sh"
diff --git a/docs/pages/1 - Intro to Mill.md b/docs/pages/1 - Intro to Mill.md
index 20fe83b8..b07595a2 100644
--- a/docs/pages/1 - Intro to Mill.md
+++ b/docs/pages/1 - Intro to Mill.md
@@ -49,13 +49,13 @@ resolved dependency lists, ...) would live in `out/foo/`.
This can be run from the Bash shell via:
```bash
-$ mill foo.compile # compile sources into classfiles
+$ mill foo.compile # compile sources into classfiles
-$ mill foo.run # run the main method, if any
+$ mill foo.runMain foo.ExampleMain # run the specified main method
-$ mill foo.jar # bundle the classfiles into a jar
+$ mill foo.jar # bundle the classfiles into a jar
-$ mill foo.assembly # bundle the classfiles and all dependencies into a jar
+$ mill foo.assembly # bundle classfiles and all dependencies into a jar
```
The most common **tasks** that Mill can run are cached **targets**, such as
diff --git a/scalalib/src/mill/scalalib/ScalaModule.scala b/scalalib/src/mill/scalalib/ScalaModule.scala
index b7810246..390672c6 100644
--- a/scalalib/src/mill/scalalib/ScalaModule.scala
+++ b/scalalib/src/mill/scalalib/ScalaModule.scala
@@ -102,10 +102,18 @@ trait ScalaModule extends mill.Module with TaskModule { outer =>
def generatedSources = T{ Seq.empty[PathRef] }
def allSources = T{ sources() ++ generatedSources() }
+ def allSourceFiles = T{
+ for {
+ root <- allSources()
+ if exists(root.path)
+ path <- ls.rec(root.path)
+ if path.isFile && (path.ext == "scala" || path.ext == "java")
+ } yield PathRef(path)
+ }
def compile: T[CompilationResult] = T.persistent{
mill.scalalib.ScalaWorkerApi.scalaWorker().compileScala(
scalaVersion(),
- allSources().map(_.path),
+ allSourceFiles().map(_.path),
scalaCompilerBridgeSources().map(_.path),
compileClasspath().map(_.path),
scalaCompilerClasspath().map(_.path),
diff --git a/scalaworker/src/mill/scalaworker/ScalaWorker.scala b/scalaworker/src/mill/scalaworker/ScalaWorker.scala
index 3990d9dc..5b5808cb 100644
--- a/scalaworker/src/mill/scalaworker/ScalaWorker.scala
+++ b/scalaworker/src/mill/scalaworker/ScalaWorker.scala
@@ -182,12 +182,7 @@ class ScalaWorker(ctx0: mill.util.Ctx,
val newResult = ic.compile(
ic.inputs(
classpath = classesIODir +: compileClasspathFiles,
- sources = for {
- root <- sources.toArray
- if exists(root)
- path <- ls.rec(root)
- if path.isFile && (path.ext == "scala" || path.ext == "java")
- } yield path.toIO,
+ sources = sources.toArray.map(_.toIO),
classesDirectory = classesIODir,
scalacOptions = (scalacPluginClasspath.map(jar => s"-Xplugin:${jar}") ++ scalacOptions).toArray,
javacOptions = javacOptions.toArray,