From a80201ad73fd9803da3a2e2d0a088766d4de4e1a Mon Sep 17 00:00:00 2001 From: Minghao Liu Date: Fri, 19 Jan 2018 19:48:50 +0800 Subject: add resource folders, only one output folder is supported (#113) --- .../src/main/scala/mill/scalalib/GenIdea.scala | 24 ++++++++++++++-------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/scalalib/src/main/scala/mill/scalalib/GenIdea.scala b/scalalib/src/main/scala/mill/scalalib/GenIdea.scala index e9d8fac5..73699a9e 100644 --- a/scalalib/src/main/scala/mill/scalalib/GenIdea.scala +++ b/scalalib/src/main/scala/mill/scalalib/GenIdea.scala @@ -69,10 +69,11 @@ object GenIdea { val moduleFiles = resolved.map{ case (path, resolvedDeps, mod) => val Seq( + resoucesPathRefs: Loose.Agg[PathRef], sourcesPathRef: Loose.Agg[PathRef], generatedSourcePathRefs: Loose.Agg[PathRef], allSourcesPathRefs: Loose.Agg[PathRef] - ) = evaluator.evaluate(Agg(mod.sources, mod.generatedSources, mod.allSources)).values + ) = evaluator.evaluate(Agg(mod.resources, mod.sources, mod.generatedSources, mod.allSources)).values val generatedSourcePaths = generatedSourcePathRefs.map(_.path) val normalSourcePaths = (allSourcesPathRefs.map(_.path).toSet -- generatedSourcePaths.toSet).toSeq @@ -83,9 +84,10 @@ object GenIdea { ) val elem = moduleXmlTemplate( + Strict.Agg.from(resoucesPathRefs.map(_.path)), Strict.Agg.from(normalSourcePaths), Strict.Agg.from(generatedSourcePaths), - Strict.Agg(paths.out), + paths.out, Strict.Agg.from(resolvedDeps.map(pathToLibName)), Strict.Agg.from(mod.moduleDeps.map{ m => moduleName(moduleLabels(m))}.distinct) ) @@ -152,18 +154,15 @@ object GenIdea { } - def moduleXmlTemplate(normalSourcePaths: Strict.Agg[Path], + def moduleXmlTemplate(resourcePaths: Strict.Agg[Path], + normalSourcePaths: Strict.Agg[Path], generatedSourcePaths: Strict.Agg[Path], - outputPaths: Strict.Agg[Path], + outputPath: Path, libNames: Strict.Agg[String], depNames: Strict.Agg[String]) = { - { - for(outputPath <- outputPaths.toSeq) - yield - } - + { for (normalSourcePath <- normalSourcePaths.toSeq) @@ -179,6 +178,13 @@ object GenIdea { } + { + for (resourcePath <- resourcePaths.toSeq) + yield + + + + } -- cgit v1.2.3