title: configuring existing eclipse java project to build using gradle
body: <p>I have an existing Java project in Eclipse. I want to implement builds using gradle. I tried using the gradle eclipse plugin as given  <a href="http://gradle.org/docs/current/userguide/eclipse_plugin.html" rel="noreferrer">here</a> but ran into numerous errors in Eclipse. </p>
  
  <p>I am using gradle 1.3, and I tried running gradle from command prompt, but I get compilation errors.</p>
  
  <p>So my question is, does anyone know of some good resource which offers a how-to for converting an existing java project in Eclipse to compile using gradle. I also have some dependencies on other projects. The link to the tutorial I have given is not really helpful.</p>
  
  <p>UPDATE:
  I can get gradle to work if my project doesn't have dependencies on other projects. However, if it does refer to some other project, I can't figure out how to reference another project? I have added the referenced project dir to repositories but I still get "class does not exist" errors. My gradle file is as below:</p>
  
  <pre><code>apply plugin: 'java'
  apply plugin: 'eclipse'
  
  version='1.0-SNAPSHOT'
  
  def repositoryPath = 'C:/Users/AMoody/workspace/temp/temp-protocols/'
  
  repositories{
      mavenCentral()
      flatDir {
          dirs repositoryPath
      }
  }
  
  dependencies{
  
      compile 'org.slf4j:slf4j-api:1.+'
      compile 'junit:junit:4.+'
       testCompile 'junit:junit:4.+'
  
  }
  </code></pre>