diff --git a/scalalib/src/mill/scalalib/ScalaModule.scala b/scalalib/src/mill/scalalib/ScalaModule.scala index e54e2e02e6c..921cc3bdd76 100644 --- a/scalalib/src/mill/scalalib/ScalaModule.scala +++ b/scalalib/src/mill/scalalib/ScalaModule.scala @@ -125,7 +125,7 @@ trait ScalaModule extends JavaModule { outer => val files = for{ ref <- allSources() if exists(ref.path) - p <- ls.rec(ref.path) + p <- (if (ref.path.isDir) ls.rec(ref.path) else Seq(ref.path)) if (p.isFile && ((p.ext == "scala") || (p.ext == "java"))) } yield p.toNIO.toString