title: Tell gradle to include an Eclipse project from same workspace
body: <p>I have an Eclipse workspace (to be more specific STS 3.6.4) with two projects:</p>
  
  <pre><code>project1
  project2
  </code></pre>
  
  <p>Both projects are gradle projects, project1 provides classes I need in project2. Because of this I added project1 under <code>Projects</code> in <code>Configure Build Path</code>.</p>
  
  <p>This works fine as long as I do not call <code>Refresh all</code> on gradle. Whenever I do this I have to setup the whole thing again.
  I know how I could add a jar of project1 to project2, but during my development phase I do not want to build jars all the times. And I have not yet setup a repository where I could publish project1.</p>
  
  <p>Is there a way to tell gradle to include .java/.class files from other proects when run from STS ?</p>
  
  <p>I tried things like this:</p>
  
  <pre><code>compile project( ":project1 )
  </code></pre>
  
  <p>(read about this <a href="https://stackoverflow.com/questions/28463505/how-to-resolve-dependencies-from-one-gradle-project-to-another-gradle-project-in">here</a>), but this does not have the intended effect. I read <a href="https://stackoverflow.com/questions/26282985/is-it-possible-for-gradle-projects-in-eclipse-sts-to-resolve-dependencies-to-oth">another stackoverflow post</a> but have to admit I could not get <code>remap jars to Gradle projects</code> to work for me.</p>