I have a project setup that is as follows
Project A
|
|-Sub-Project B
|-Sub-Project C
| |
| \-src
| |
| |-Sub-Project D
| \-Sub-Project E
\-Sub-Project F
In order to get the project to build and Idea modules created I need to put a build.gradle file at each level, however I dont really want idea modules created for Project C and the child src directory. Is there a way to suppress these modules?
Also is there a way to specify a group for idea modules?
I have found the answer to the question of not adding the projects to the ipr file. Adding the following to my top level build.gradle file only adds projects where ideaModule.enabled == true.
gradle.projectsEvaluated {
gradle.rootProject {
ideaModule.enabled = false
idea {
project {
modulesToInclude = subprojects.findAll {it.ideaModule.enabled == true}
modules = modulesToInclude.idea.module
}
}
}
}
Just create Sub-Project D
directly in the Sub-Project C
directory (without a src
directory). You can also omit build.gradle
in Sub-Project C
. Idea 13 imports that structure without any problems. Just remember to add only the real subprojects to the settings.gradle
:
include 'Sub-Project B', 'Sub-Project D', 'Sub-Project E', ...