Can Eclipse Buildship (Gradle plugin) update my java project library path configuration based on it's dependencies?
<p>I am migrating my Java (EJB project) and Dynamic Web projects in Eclipse to Gradle. I am using Buildship. My projects have a Eclipse Library configuration, which it was a pain to maintain. With grade this is great as I just add those "dependencies" to build.gradle file... etc. You know. That's fine.</p>

<p>My question is if I can use the Eclipse plugin in Gradle to make it reconfigure the Build path for the project in eclipse and remove the old Eclipse libraries and have the project in Eclipse be build based on same jars downloaded by Gradle as dependencies so if I change a version of one of the dependencies, Eclipse compiler will also compile code based on that new jar dependency. thanks.</p>

<p>I editing to add files:</p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;projectDescription&gt;
        &lt;name&gt;ElizaTourismEJB&lt;/name&gt;
        &lt;comment&gt;&lt;/comment&gt;
        &lt;projects&gt;
        &lt;/projects&gt;
        &lt;buildSpec&gt;
                &lt;buildCommand&gt;
                        &lt;name&gt;org.eclipse.jdt.core.javabuilder&lt;/name&gt;
                        &lt;arguments&gt;
                        &lt;/arguments&gt;
                &lt;/buildCommand&gt;
                &lt;buildCommand&gt;
                        &lt;name&gt;org.eclipse.wst.common.project.facet.core.builder&lt;/name&gt;
                        &lt;arguments&gt;
                        &lt;/arguments&gt;
                &lt;/buildCommand&gt;
                &lt;buildCommand&gt;
                        &lt;name&gt;org.jboss.tools.jst.web.kb.kbbuilder&lt;/name&gt;
                        &lt;arguments&gt;
                        &lt;/arguments&gt;
                &lt;/buildCommand&gt;
                &lt;buildCommand&gt;
                        &lt;name&gt;org.jboss.tools.cdi.core.cdibuilder&lt;/name&gt;
                        &lt;arguments&gt;
                        &lt;/arguments&gt;
                &lt;/buildCommand&gt;
                &lt;buildCommand&gt;
                        &lt;name&gt;org.eclipse.wst.validation.validationbuilder&lt;/name&gt;
                        &lt;arguments&gt;
                        &lt;/arguments&gt;
                &lt;/buildCommand&gt;
                &lt;buildCommand&gt;
                        &lt;name&gt;org.hibernate.eclipse.console.hibernateBuilder&lt;/name&gt;
                        &lt;arguments&gt;
                        &lt;/arguments&gt;
                &lt;/buildCommand&gt;
                &lt;buildCommand&gt;
                        &lt;name&gt;org.eclipse.buildship.core.gradleprojectbuilder&lt;/name&gt;
                        &lt;arguments&gt;
                        &lt;/arguments&gt;
                &lt;/buildCommand&gt;
        &lt;/buildSpec&gt;
        &lt;natures&gt;
                &lt;nature&gt;org.eclipse.jem.workbench.JavaEMFNature&lt;/nature&gt;
                &lt;nature&gt;org.eclipse.wst.common.modulecore.ModuleCoreNature&lt;/nature&gt;
                &lt;nature&gt;org.eclipse.wst.common.project.facet.core.nature&lt;/nature&gt;
                &lt;nature&gt;org.eclipse.jdt.core.javanature&lt;/nature&gt;
                &lt;nature&gt;org.jboss.tools.jst.web.kb.kbnature&lt;/nature&gt;
                &lt;nature&gt;org.jboss.tools.cdi.core.cdinature&lt;/nature&gt;
                &lt;nature&gt;org.hibernate.eclipse.console.hibernateNature&lt;/nature&gt;
                &lt;nature&gt;org.eclipse.buildship.core.gradleprojectnature&lt;/nature&gt;
        &lt;/natures&gt;
&lt;/projectDescription&gt;
</code></pre>

<p>.classpath:</p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;classpath&gt;
        &lt;classpathentry kind="src" path="src/main/java"&gt;
                &lt;attributes&gt;
                        &lt;attribute name="FROM_GRADLE_MODEL" value="true"/&gt;
                &lt;/attributes&gt;
        &lt;/classpathentry&gt;
        &lt;classpathentry kind="src" path="src/test/java"&gt;
                &lt;attributes&gt;
                        &lt;attribute name="FROM_GRADLE_MODEL" value="true"/&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;classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"&gt;
                &lt;attributes&gt;
                        &lt;attribute name="org.eclipse.jst.component.nondependency" value=""/&gt;
                &lt;/attributes&gt;
        &lt;/classpathentry&gt;
        &lt;classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/&gt;
        &lt;classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Jackson2"/&gt;
        &lt;classpathentry kind="lib" path="commons-collections4-4.1.jar"/&gt;
        &lt;classpathentry kind="lib" path="/ElizaTourismREST/WebContent/WEB-INF/lib/freemarker.jar"/&gt;
        &lt;classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Redis"/&gt;
        &lt;classpathentry kind="con" path="org.eclipse.jst.server.core.container/com.ibm.ws.st.core.runtimeClasspathProvider/WebSphere Application Server Liberty Profile 16003"&gt;
                &lt;attributes&gt;
                        &lt;attribute name="owner.project.facets" value="jst.ejb;jpt.jpa"/&gt;
                &lt;/attributes&gt;
        &lt;/classpathentry&gt;
        &lt;classpathentry kind="lib" path="/Developer/java-lib/aspirin-0.11.01.jar"/&gt;
        &lt;classpathentry kind="src" path=".apt_generated"&gt;
                &lt;attributes&gt;
                        &lt;attribute name="optional" value="true"/&gt;
                &lt;/attributes&gt;
        &lt;/classpathentry&gt;
        &lt;classpathentry kind="output" path="target/bin"/&gt;
&lt;/classpath&gt;
</code></pre>

<p>build.gradle:</p>

<pre><code>apply plugin: 'java'
apply plugin: 'eclipse'

sourceCompatibility = 1.8
targetCompatibility = 1.8

repositories {
    jcenter()
    mavenCentral()
}

ext {
    swagger_annotations_version = "1.5.9"
}

dependencies {
    compile 'org.slf4j:slf4j-api:1.7.21'

    testCompile 'junit:junit:4.12'

    compile group: 'javax', name: 'javaee-api', version:'7.0'
    compile "io.swagger:swagger-annotations:$swagger_annotations_version"
    compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.5.4'
    compile group: 'com.fasterxml.jackson.module', name: 'jackson-module-jaxb-annotations', version: '2.5.4'
    compile group: 'biz.paluch.redis', name: 'lettuce', version: '4.3.0.Final'
    compile group: 'org.masukomi', name: 'aspirin', version: '0.11.01'
    compile group: 'org.freemarker', name: 'freemarker', version: '2.3.23'

}
</code></pre>