title: gradle include library from another project
body: <p>I have this project setup (in Android AIDE):</p>
  
  <pre><code>|---Project1  
  |     |---App  
  |     |---Lib
  |
  |---Project2  
       |---App
  </code></pre>
  
  <p>I want add project 1 Lib as dependency (or linked source, because i only need to access 1 class from the library) to Project2.</p>
  
  <p>Project2 settings.gradle:</p>
  
  <pre><code>include ':Lib'
  project(':Lib').projectDir = new File(settingsDir, '../Project1/Lib')
  </code></pre>
  
  <p>Project2 build.gradle:</p>
  
  <pre><code>compile project(':Lib')
  </code></pre>
  
  <p>I am getting the following error:</p>
  
  <pre><code>Project dependency 'Lib' not found.
  </code></pre>
  
  <p>Is there anything wrong with the folder path? I didn't find any good solution for this problem and i am not very familiar with gradle.</p>
  
  <p>If i would instead link the library source folder to Project2 i tried to add the following lines to the build.gradle (under android section):</p>
  
  <pre><code> sourceSets {
      main.java.srcDirs += '/../Project1/Lib/src/main/'
  }
  </code></pre>
  
  <p>I could access the source if i used the full path down to the folder with the class file but with the problem that when i instantiated the class from the Lib in Project2 it gave me the error that the class was not found inside the package.</p>
  
  <p>Do both projects need to have the same package names? What would be the best solution to manage this without having the Library as an standalone library?</p>