Skip to content

Commit

Permalink
don't compile hidden files. fixes #402 (#428)
Browse files Browse the repository at this point in the history
  • Loading branch information
rockjam authored and lihaoyi committed Sep 5, 2018
1 parent ec5f843 commit fc86e68
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scalalib/src/mill/scalalib/JavaModule.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit fc86e68

Please sign in to comment.