Permalink
Browse files

Added support for subprojects with separate project definitions

  • Loading branch information...
1 parent b549006 commit 9f17cc8904578b30d598d31fbe3d738840ab6394 davidl committed with Mikko Peltonen Sep 8, 2011
Showing with 9 additions and 3 deletions.
  1. +9 −3 src/main/scala/org/sbtidea/SbtIdeaPlugin.scala
@@ -49,9 +49,15 @@ object SbtIdeaPlugin extends Plugin {
val uri = buildStruct.root
val name: Option[String] = ideaProjectName in extracted.currentRef get buildStruct.data
- val projectList = buildUnit.defined.map {
- case (id, proj) => (ProjectRef(uri, id) -> proj)
- }
+ val projectList = buildUnit.defined.flatMap {
+ case (id, proj) =>
+ var subs = for {
+ ref <- proj.aggregate
+ subProj <- Project.getProject(ref, buildStruct)
+ } yield (ref -> subProj)
+
+ (ProjectRef(uri, id) -> proj) :: subs.toList
+ }
def ignoreModule(projectRef: ProjectRef): Boolean = {
(ideaIgnoreModule in projectRef get buildStruct.data).getOrElse(false)

0 comments on commit 9f17cc8

Please sign in to comment.