title: Add dependencies in Eclipse using Gradle
body: <p>I'm using the Gradle IDE plugin for Eclipse and I've created a custom task in my build.gradle file:</p>
  
  <pre><code>sourceSets {
      unitTest {
          java.srcDirs = ['tests']
      }
  }
  
  dependencies {
      unitTestCompile files("$project.buildDir/classes/debug")
      unitTestCompile 'junit:junit:4.11'
      unitTestCompile 'org.robolectric:robolectric:2.1.1'
      unitTestCompile 'com.google.android:android:4.0.1.2' 
  }
  
  configurations {
      unitTestCompile.extendsFrom runtime
      unitTestRuntime.extendsFrom unitTestCompile
  }
  
  task unitTest(type:Test, dependsOn: assemble) {
      description = "run unit tests"
      testClassesDir = project.sourceSets.unitTest.output.classesDir
      classpath = project.sourceSets.unitTest.runtimeClasspath
  }
  
  build.dependsOn unitTest
  </code></pre>
  
  <p>The problem is that the dependencies I've referenced are not added in Eclipse and I get the error that <code>import org.junit.Test;</code>,  <code>import org.robolectric.Robolectric;</code> and so on, can't be resolved. I've tried right clicking on the project -> Gradle -> Refresh Dependencies but to no avail.</p>