afterProject { project-> project.plugins.withType(org.gradle.plugins.eclipse.EclipsePlugin.class).all { // delay adding whenConfigured till the entryAttributes are added (must be the last whenConfigured) project.eclipseClasspath.doFirst { whenConfigured { classpath -> def includeDeps = project.configurations.getByName('runtime')?.collect { f-> f.absolutePath } as Set classpath.entries.findAll { it instanceof org.gradle.plugins.eclipse.model.Library && !includeDeps.contains(it.path) }.each { it.entryAttributes.remove('org.eclipse.jst.component.dependency') } } } } }