diff options
author | Guillaume Galy <guilgaly@users.noreply.github.com> | 2018-05-06 20:30:47 +0200 |
---|---|---|
committer | Nikolay Tatarinov <5min4eq.unity@gmail.com> | 2018-05-06 21:30:47 +0300 |
commit | cb327ee2f04a5493d285b4e4dd04a89c96b7c23c (patch) | |
tree | 0d0308775cf2a00b0cad5ea8a058dbb2d7a28084 /scalalib/src | |
parent | f7a02a46f847d4433cd771840fd0b6cc314215d8 (diff) | |
download | mill-cb327ee2f04a5493d285b4e4dd04a89c96b7c23c.tar.gz mill-cb327ee2f04a5493d285b4e4dd04a89c96b7c23c.tar.bz2 mill-cb327ee2f04a5493d285b4e4dd04a89c96b7c23c.zip |
fix GenIdeaImpl test modules (#312)
fix the syntax for the test output and resource folders
Diffstat (limited to 'scalalib/src')
-rw-r--r-- | scalalib/src/mill/scalalib/GenIdeaImpl.scala | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/scalalib/src/mill/scalalib/GenIdeaImpl.scala b/scalalib/src/mill/scalalib/GenIdeaImpl.scala index 7ab6ffb7..763482c8 100644 --- a/scalalib/src/mill/scalalib/GenIdeaImpl.scala +++ b/scalalib/src/mill/scalalib/GenIdeaImpl.scala @@ -329,7 +329,13 @@ object GenIdeaImpl { ) = { <module type="JAVA_MODULE" version="4"> <component name="NewModuleRootManager"> - <output url={"file://$MODULE_DIR$/" + relify(compileOutputPath) + "/dest/classes"} /> + { + val outputUrl = "file://$MODULE_DIR$/" + relify(compileOutputPath) + "/dest/classes" + if (isTest) + <output-test url={outputUrl} /> + else + <output url={outputUrl} /> + } <exclude-output /> <content url={"file://$MODULE_DIR$/" + relify(generatedSourceOutputPath)} /> <content url={"file://$MODULE_DIR$/" + relify(basePath)}> @@ -344,9 +350,10 @@ object GenIdeaImpl { <sourceFolder url={"file://$MODULE_DIR$/" + relify(generatedSourcePath)} isTestSource={isTest.toString} generated="true" /> } { + val resourceType = if (isTest) "java-test-resource" else "java-resource" for (resourcePath <- resourcePaths.toSeq.sorted) yield - <sourceFolder url={"file://$MODULE_DIR$/" + relify(resourcePath)} isTestSource={isTest.toString} type="java-resource" /> + <sourceFolder url={"file://$MODULE_DIR$/" + relify(resourcePath)} type={resourceType} /> } <excludeFolder url={"file://$MODULE_DIR$/" + relify(basePath) + "/target"} /> </content> |