title: Gradle multi project dependency no import
body: <p>I would like to build a new project using an existing project as dependency. The following file structure is used:</p>
  
  <pre><code>projA
      -src
          -main
              -java
                  -HelloWorld.java
      -build.gradle
      -settings.gradle
  projB
      -src
          -main
              -java
                  -Greeter.java
      -build.gradle
      -settings.gradle
  </code></pre>
  
  <p>Project in projA depends on the project in projB (HelloWorld uses Greeter). The settings.gradle of projB looks like this:</p>
  
  <pre><code>rootProject.name = 'projB'
  </code></pre>
  
  <p>The build.gradle is also pretty straight forward:</p>
  
  <pre><code>apply plugin: 'java'
  
  sourceCompatibility = 1.8
  
  repositories {
      mavenCentral()
  }
  
  dependencies {
      testCompile group: 'junit', name: 'junit', version: '4.12'
  }
  </code></pre>
  
  <p>The settings.gradle file of projA is set up to include projB like so:</p>
  
  <pre><code>rootProject.name = 'projA'
  include ':projB'
  project(':projB').projectDir = new File(settingsDir, '../projB')
  </code></pre>
  
  <p>Finally, the build.gradle of projA includes the project like so:</p>
  
  <pre><code>apply plugin: 'java'
  
  sourceCompatibility = 1.8
  
  repositories {
      mavenCentral()
  }
  
  dependencies {
      compile project(':projB')
      testCompile group: 'junit', name: 'junit', version: '4.12'
  }
  </code></pre>
  
  <p>Now, if I want to use Greeter in HelloWorld, I get an import error. Even if I rebuild the projA project. This is about as clean of a multi project as I can come up with. Why am I not able to use the classes of the specified dependency?</p>