title: Gradle composite build can't resolve transitive dependencies
body: <p>I have a project A which depends on library B, I am using gradle composite builds.</p>
  <p>Project B contains several common dependencies such as &quot;org.apache.commons:commons-lang3&quot;</p>
  <p>Project A uses &quot;org.apache.commons:commons-lang3&quot; as well but transitive dependencies resolution does not work as I would expect, I have to declare again &quot;org.apache.commons:commons-lang3&quot; in the dependencies block of project A build.gradle in order to make it work.</p>
  <p><strong>Project A build.gradle:</strong></p>
  <pre><code>group = 'org.example.app'
  version = '0.1.0'
  
  plugins {
     id 'java'
     id 'application' 
  }
  
  java {
      toolchain {
          languageVersion.set(JavaLanguageVersion.of(11))
      }
  }
  
  dependencies {
      implementation 'org.example.libs:B'
  }
  </code></pre>
  <p><strong>Project A settings.gradle</strong></p>
  <pre><code>includeBuild '../../libs/B'
  </code></pre>
  <p><strong>Project B build.gradle:</strong></p>
  <pre><code>group = 'org.example.libs'
  version = '0.1.0
  
  plugins {
     id 'java-library'
  }
  
  java {
      toolchain {
          languageVersion.set(JavaLanguageVersion.of(11))
      }
  }
  
  dependencies {
      implementation 'org.apache.commons:commons-lang3:3.12.0'
  }
  
  repositories {
      mavenCentral()
  }
  </code></pre>
  <p>Project B compiles well as standalone but I can't compile project A without adding again
  &quot;org.apache.commons:commons-lang3:3.12.0&quot; in its build.gradle. Isn't it supposed to be resolved as transitive dependency from project B ?</p>
  <p>Project A Compilation throws errors such as :</p>
  <pre><code>error: package org.apache.commons.lang3 does not exist
  </code></pre>
  <p>What am I missing ?</p>