diff options
author | Nikolay Tatarinov <5min4eq.unity@gmail.com> | 2018-09-05 07:10:39 +0300 |
---|---|---|
committer | Li Haoyi <haoyi.sg@gmail.com> | 2018-09-05 12:10:39 +0800 |
commit | fc86e68cb3ae31d1cd1b07df9665d34cf617954d (patch) | |
tree | dee420b8938efb068fd35bf5bb8cba78bcdd93db | |
parent | ec5f843aa2a53fc8e24f3366f483db6c971ba85b (diff) | |
download | mill-fc86e68cb3ae31d1cd1b07df9665d34cf617954d.tar.gz mill-fc86e68cb3ae31d1cd1b07df9665d34cf617954d.tar.bz2 mill-fc86e68cb3ae31d1cd1b07df9665d34cf617954d.zip |
don't compile hidden files. fixes #402 (#428)
-rw-r--r-- | scalalib/src/mill/scalalib/JavaModule.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scalalib/src/mill/scalalib/JavaModule.scala b/scalalib/src/mill/scalalib/JavaModule.scala index ab4f8795..fc01dceb 100644 --- a/scalalib/src/mill/scalalib/JavaModule.scala +++ b/scalalib/src/mill/scalalib/JavaModule.scala @@ -135,11 +135,12 @@ trait JavaModule extends mill.Module with TaskModule { outer => def allSources = T{ sources() ++ generatedSources() } def allSourceFiles = T{ + def isHiddenFile(path: Path) = path.segments.last.startsWith(".") for { root <- allSources() if exists(root.path) path <- (if (root.path.isDir) ls.rec(root.path) else Seq(root.path)) - if path.isFile && (path.ext == "scala" || path.ext == "java") + if path.isFile && ((path.ext == "scala" || path.ext == "java") && !isHiddenFile(path)) } yield PathRef(path) } |