From a8885fe610eb48c11fc48ca47bfa1f2a295d5bc2 Mon Sep 17 00:00:00 2001 From: Jeremy Apthorp Date: Mon, 5 Mar 2018 20:23:12 -0800 Subject: Add out/{module_name} as a content root in generated IntelliJ project (#196) --- scalalib/src/mill/scalalib/GenIdea.scala | 11 +++++++++-- scalalib/test/resources/gen-idea/idea_modules/iml | 1 + 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'scalalib') diff --git a/scalalib/src/mill/scalalib/GenIdea.scala b/scalalib/src/mill/scalalib/GenIdea.scala index 6304fb14..8d7bfc55 100644 --- a/scalalib/src/mill/scalalib/GenIdea.scala +++ b/scalalib/src/mill/scalalib/GenIdea.scala @@ -190,6 +190,10 @@ object GenIdea { mod.compile.ctx.segments ) val Seq(scalaVersion: String) = evaluator.evaluate(Agg(mod.scalaVersion)).values + val generatedSourceOutPath = Evaluator.resolveDestPaths( + evaluator.outPath, + mod.generatedSources.ctx.segments + ) val elem = moduleXmlTemplate( mod.millModuleBasePath.value, @@ -198,6 +202,7 @@ object GenIdea { Strict.Agg.from(normalSourcePaths), Strict.Agg.from(generatedSourcePaths), paths.out, + generatedSourceOutPath.dest, Strict.Agg.from(resolvedDeps.map(pathToLibName)), Strict.Agg.from(mod.moduleDeps.map{ m => moduleName(moduleLabels(m))}.distinct) ) @@ -291,13 +296,15 @@ object GenIdea { resourcePaths: Strict.Agg[Path], normalSourcePaths: Strict.Agg[Path], generatedSourcePaths: Strict.Agg[Path], - outputPath: Path, + compileOutputPath: Path, + generatedSourceOutputPath: Path, libNames: Strict.Agg[String], depNames: Strict.Agg[String]) = { - + + { for (normalSourcePath <- normalSourcePaths.toSeq.sorted) diff --git a/scalalib/test/resources/gen-idea/idea_modules/iml b/scalalib/test/resources/gen-idea/idea_modules/iml index 1fe9be83..0124e06e 100644 --- a/scalalib/test/resources/gen-idea/idea_modules/iml +++ b/scalalib/test/resources/gen-idea/idea_modules/iml @@ -2,6 +2,7 @@ + -- cgit v1.2.3