diff --git a/scalalib/src/mill/scalalib/GenIdeaImpl.scala b/scalalib/src/mill/scalalib/GenIdeaImpl.scala index f71a7856fd8..b4f77f16bcf 100644 --- a/scalalib/src/mill/scalalib/GenIdeaImpl.scala +++ b/scalalib/src/mill/scalalib/GenIdeaImpl.scala @@ -26,6 +26,7 @@ object GenIdea extends ExternalModule { implicit def millScoptEvaluatorReads[T] = new mill.main.EvaluatorScopt[T]() lazy val millDiscover = Discover[this.type] } + object GenIdeaImpl { def apply(ctx: Log with Home, @@ -225,8 +226,9 @@ object GenIdeaImpl { Tuple2( ".idea"/"modules.xml", allModulesXmlTemplate( - for((path, mod) <- modules) - yield moduleName(path) + modules + .filter(!_._2.skipIdea) + .map { case (path, mod) => moduleName(path) } ) ), Tuple2( diff --git a/scalalib/src/mill/scalalib/JavaModule.scala b/scalalib/src/mill/scalalib/JavaModule.scala index b15e0bdb86d..15fa7264902 100644 --- a/scalalib/src/mill/scalalib/JavaModule.scala +++ b/scalalib/src/mill/scalalib/JavaModule.scala @@ -527,6 +527,11 @@ trait JavaModule extends mill.Module with TaskModule { outer => def intellijModulePath: Path = millSourcePath def forkWorkingDir = T{ ammonite.ops.pwd } + + /** + * Skip Idea project file generation. + */ + def skipIdea: Boolean = false } trait TestModule extends JavaModule with TaskModule {