title: How to add a dependency to another project properly using gradle?
body: <p>Hello I am new to gradle and it is a little bit confusing for me. How should I add a dependency in my gradle configuration to have access to <em>B1.java</em> in <em>projectA1</em>? Project B is gradle project and project A is just a folder with another gradle projects.</p>
  
  <p>Here is my structure:</p>
  
  <ol>
  <li>Workspace:
  
  <ul>
  <li>ProjectA
  
  <ul>
  <li>projectA1
  
  <ul>
  <li>... </li>
  <li><strong>here I want to have access to <em>B1.java</em></strong></li>
  <li>build.gradle</li>
  </ul></li>
  <li>projectA2
  
  <ul>
  <li>...</li>
  <li>build.gradle</li>
  </ul></li>
  </ul></li>
  <li>ProjectB
  
  <ul>
  <li>projectB1
  
  <ul>
  <li><em>B1.java</em></li>
  <li>... </li>
  <li>build.gradle</li>
  </ul></li>
  <li>projectB2
  
  <ul>
  <li>...</li>
  <li>build.gradle</li>
  </ul></li>
  <li>build.gradle</li>
  </ul></li>
  </ul></li>
  </ol>
  
  <p>I tried to read gradle documentation, but it is not clear for me. Any help appreciated. Thanks!</p>