title: Can Android Libraries in Gradle have other Android Libraries as dependencies?
body: <p>Is this structure allowed?</p>
  
  <pre><code>MyProject/
   | settings.gradle
   + app/
      | build.gradle
   + libraries/
      + lib1/
         | settings.gradle
         | build.gradle
         + libraries/
            + sublib1/
               | build.gradle
            + sublib2/
               | build.gradle
      + lib2/
         | build.gradle
  </code></pre>
  
  <p>I had this working with Ant but with Gradle my project can't find sublib1 or sublib2.</p>
  
  <p><em>When I run gradle I get this error:</em></p>
  
  <pre><code>* What went wrong:
  A problem occurred evaluating project ':libraries:lib1'.
  &gt; Project with path ':libraries:sublib1' could not be found in project ':libraries:lib1'.
  </code></pre>
  
  <p>This is <strong>settings.gradle</strong> from <strong>MyProject</strong>:</p>
  
  <pre><code>include ':libraries:lib1'
  include ':libraries:lib2'
  </code></pre>
  
  <p>This is <strong>build.gradle</strong> from <strong>MyProject</strong>:</p>
  
  <pre><code>buildscript {
      repositories {
          mavenCentral()
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:0.4'
      }
  }
  apply plugin: 'android'
  
  dependencies {
      compile fileTree(dir: 'libs', include: '*.jar')
      compile project(':libraries:lib1')
      compile project(':libraries:lib2')
  }
  
  android {
      compileSdkVersion 15
      buildToolsVersion "17.0.0"
  
      sourceSets {
          main {
              manifest.srcFile 'AndroidManifest.xml'
              java.srcDirs = ['src']
              resources.srcDirs = ['src']
              aidl.srcDirs = ['src']
              renderscript.srcDirs = ['src']
              res.srcDirs = ['res']
              assets.srcDirs = ['assets']
          }
  
          instrumentTest.setRoot('tests')
      }
  }
  </code></pre>
  
  <p>This is <strong>settings.gradle</strong> from <strong>lib1</strong>:</p>
  
  <pre><code>include ':libraries:sublib1'
  include ':libraries:sublib2'
  </code></pre>
  
  <p>This is <strong>build.gradle</strong> from <strong>lib1</strong>:</p>
  
  <pre><code>buildscript {
      repositories {
          mavenCentral()
      }
  
      dependencies {
          compile fileTree(dir: 'libs', include: '*.jar')
          compile project(':libraries:sublib1')
          compile project(':libraries:sublib2')
      }
  }
  
  apply plugin: 'android-library'
  
  android {
      compileSdkVersion 15
  }
  </code></pre>