diff options
author | Jeremy Apthorp <nornagon@nornagon.net> | 2018-03-05 20:23:12 -0800 |
---|---|---|
committer | Li Haoyi <haoyi.sg@gmail.com> | 2018-03-05 20:23:12 -0800 |
commit | a8885fe610eb48c11fc48ca47bfa1f2a295d5bc2 (patch) | |
tree | 118a8e7a8bffcb72323c5e0d4208a6e78af0fb89 /scalalib/src | |
parent | eedd0b2eed3dc7259fcd6c9cef306e7e4972c62c (diff) | |
download | mill-a8885fe610eb48c11fc48ca47bfa1f2a295d5bc2.tar.gz mill-a8885fe610eb48c11fc48ca47bfa1f2a295d5bc2.tar.bz2 mill-a8885fe610eb48c11fc48ca47bfa1f2a295d5bc2.zip |
Add out/{module_name} as a content root in generated IntelliJ project (#196)
Diffstat (limited to 'scalalib/src')
-rw-r--r-- | scalalib/src/mill/scalalib/GenIdea.scala | 11 |
1 files changed, 9 insertions, 2 deletions
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]) = { <module type="JAVA_MODULE" version="4"> <component name="NewModuleRootManager"> - <output url={"file://$MODULE_DIR$/" + relify(outputPath) + "/dest/classes"} /> + <output url={"file://$MODULE_DIR$/" + relify(compileOutputPath) + "/dest/classes"} /> <exclude-output /> + <content url={"file://$MODULE_DIR$/" + relify(generatedSourceOutputPath)} /> <content url={"file://$MODULE_DIR$/" + relify(basePath)}> { for (normalSourcePath <- normalSourcePaths.toSeq.sorted) |