# Nested projects / submodules and settings.gradle

**URL:** <https://discuss.gradle.org/t/nested-projects-submodules-and-settings-gradle/2920>\
**Category:** Old Forum Archive\
**Created:** [July 30, 2014, 6:05pm UTC](https://discuss.gradle.org/t/nested-projects-submodules-and-settings-gradle/2920 "2014-07-30T18:05:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![JamesWald](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/jameswald/32/6114_2.png) [@JamesWald](https://discuss.gradle.org/u/JamesWald)\
**Post date:** [July 30, 2014, 6:05pm UTC](https://discuss.gradle.org/t/nested-projects-submodules-and-settings-gradle/2920/1 "2014-07-30T18:05:00Z")

</div>

I realize it’s been asked before, and the official feature is coming in the future. However, I’m curious if it’s possible to include nested settings.gradle files with a bit of Groovy. Ideally the code would go directly into settings.gradle such as ‘evaluate(new File("submoduleA/settings.gradle))’. If that isn’t possible (it wasn’t working for me) perhaps a custom task could update the root settings.gradle file by processing each submodule’s settings.gradle. It would be totally fine to hardcode references to the submodule’s settings.gradle.

The main issue I’m trying to avoid is the fact that adding a project causes the build to break all the way up the submodule chain. Each time this happens, all settings.gradle files that depend on that submodule must have the new project added which is fairly painful. Adding submodules is rare but adding projects is common.
