title: Gradle - Recursive subprojects
body: <p>Assume I wanted to use <code>Gradle</code> with a project structure such as:</p>
  
  <pre><code>RootProject
  \-- SubProjectA
      \-- SubProjectAA
      \-- SubProjectAB
  </code></pre>
  
  <p>How I would I achieve this?</p>
  
  <p>What I tried is pretty straightforward. I've created all directories, with a structure described above:</p>
  
  <pre><code>RootProject
  \-- SubProjectA
      \-- SubProjectAA
          \-- build.gradle
      \-- SubProjectAB
          \-- build.gradle
      \-- build.gradle
      \-- settings.gradle
  \-- build.gradle
  \-- settings.gradle
  </code></pre>
  
  <p>RootProject/settings.gradle:</p>
  
  <pre><code>include "SubProjectA"
  </code></pre>
  
  <p>RootProject/SubProjectA/settings.gradle:</p>
  
  <pre><code>include "SubProjectAA", "SubProjectAB"
  </code></pre>
  
  <p>There are two things I tried. First, I tried importing the project in Eclipse - which didn't detect <code>SubProjectAA</code> nor <code>SubProjectAB</code>. Stunned, I ran <code>gradle projects</code> in <code>RootProject</code> and got this output:</p>
  
  <pre><code>------------------------------------------------------------
  Root project
  ------------------------------------------------------------
  
  Root project 'RootProject'
  \--- Project ':SubProjectA'
  </code></pre>
  
  <p>Still, thinking I made a mistake, I tried running the same command in SubProjectA, and got:</p>
  
  <pre><code>------------------------------------------------------------
  Root project
  ------------------------------------------------------------
  
  Root project 'RootProject'
  \--- Project ':SubProjectAA'
  \--- Project ':SubProjectAB'
  </code></pre>
  
  <p>I assume that resolving subprojects doesn't go recursively. Is there any workaround for this?</p>
  
  <p>Every example is masked with sample names, sorry if I made any mistake.</p>
  
  <p>Thanks!</p>