title: How to generate .classpath container entry(all dependencies in gradle cache) for java project in vscode using gradle eclipse?
body: <p>I'm using <code>VSCode</code> for java project, and I fonud that if there is no <code>.classpath</code> file, <code>VSCode</code> wouldn't find the proper path of dependencies and gave errors. So I used <code>gradle eclipse</code> to generate it.</p>
  
  <p>The basic <code>.classpath</code> file generated by <code>gradle eclipse</code> shown as follow:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;classpath&gt;
      &lt;classpathentry kind="src" output="bin/main" path="src/main/resources"&gt;
          &lt;attributes&gt;
              &lt;attribute name="gradle_scope" value="main"/&gt;
              &lt;attribute name="gradle_used_by_scope" value="main,test"/&gt;
          &lt;/attributes&gt;
      &lt;/classpathentry&gt;
      &lt;classpathentry kind="src" output="bin/test" path="src/test/java"&gt;
          &lt;attributes&gt;
              &lt;attribute name="gradle_scope" value="test"/&gt;
              &lt;attribute name="gradle_used_by_scope" value="test"/&gt;
          &lt;/attributes&gt;
      &lt;/classpathentry&gt;
      &lt;classpathentry kind="src" output="bin/test" path="src/test/resources"&gt;
          &lt;attributes&gt;
              &lt;attribute name="gradle_scope" value="test"/&gt;
              &lt;attribute name="gradle_used_by_scope" value="test"/&gt;
          &lt;/attributes&gt;
      &lt;/classpathentry&gt;
      &lt;classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/&gt;
  &lt;/classpath&gt;
  </code></pre>
  
  <p>After adding some dependencies in build.gradle, I run <code>gradle build</code> and <code>gradle eclipse</code>, the <code>.classpath</code> file regenerated with all the dependencies I've added, but they are shown as follow:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;classpathentry kind="lib" path="C:/Users/user/.gradle/caches/modules-2/files-2.1/org.apache.hadoop/hadoop-client/3.2.0/64e71497e5cb87e3cae9063d9899bc102c540384/hadoop-client-3.2.0.jar" sourcepath="C:/Users/xiaohu10/.gradle/caches/modules-2/files-2.1/org.apache.hadoop/hadoop-client/3.2.0/948488c756ae3707ce143f98e930f678e434291c/hadoop-client-3.2.0-sources.jar"&gt;
  ...
  </code></pre>
  
  <p>We can notice that gradle use the absolute path of all denpendencies with hard code, resulting in a very large <code>.classpath</code> file.</p>
  
  <p>I want to do the same thing like the JRE entry using a container <code>&lt;classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/&gt;</code>.</p>
  
  <p>Can gradle define a classpath <code>container</code> which containes all the dependencies from gradle cache? Just like <code>buildship</code> does on eclipse <code>&lt;classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/&gt;</code></p>
  
  <p>Thanks~</p>