title: Gradle - subprojects exclude parent defined project dependency
body: <p>How can I exclude parent defined <code>compile project</code> dependency?</p>
  
  <p>Structure of modules is as follows:</p>
  
  <pre><code>- build.gradle
  - settings.gradle
  - MAIN_MODULE_1
    - build.gradle
  - MODULE1
    - build.gradle
  - MODULE2
    - build.gradle
  - MODULE3
    - build.gradle
  - MODULE4
    - build.gradle
  </code></pre>
  
  <p>And dependency model should be:</p>
  
  <pre><code>- MODULE1 &lt;- MAIN_MODULE_1
  - MODULE2 &lt;- MAIN_MODULE_1
  - MODULE3 &lt;- MAIN_MODULE_1
  - MODULE4 &lt;- MAIN_MODULE_1
  </code></pre>
  
  <p>Which means, having </p>
  
  <pre><code>// build.gradle
  subprojects {
    apply plugin: 'java'
    dependencies {
      compile project('MAIN_MODULE_1')
    }
  }
  
  // settings.gradle
  include ':MAIN_MODULE_1'
  include ':MODULE1'
  include ':MODULE2'
  include ':MODULE3'
  include ':MODULE4'
  </code></pre>
  
  <p>will create circular dependency of <code>MAIN_MODULE_1</code> on itself, which is wrong.  </p>
  
  <p>and having the dependency in each module (of total count not 4 but 120) seems wrong to me.</p>