From 2b67f5fee644979a3c9510564f3649f83bc7da6f Mon Sep 17 00:00:00 2001 From: Rob Winch Date: Sun, 6 Mar 2011 12:49:47 -0600 Subject: [PATCH] Updated gradle build to workaround GRADLE-1422 - test dependencies being improperly deployed when using Eclipse WTP --- build.gradle | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/build.gradle b/build.gradle index b7db896488..201db9dacf 100644 --- a/build.gradle +++ b/build.gradle @@ -77,6 +77,15 @@ configure(javaProjects) { eclipseClasspath.whenConfigured { classpath -> classpath.entries.removeAll { entry -> entry.path.endsWith('/build/classes/test') } } + // GRADLE-1422 + eclipseClasspath.doFirst { + eclipseClasspath.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') + } + } + } } ideaModule {