From f57c24cd8c84f0456766c4efc30916affc5d39a5 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Mon, 14 Jan 2013 10:25:33 -0800 Subject: [PATCH] Allow 'gradle eclipse' without 'cleanEclipse' Allow eclipse projects to be regenerated without first requiring the 'gradle cleanEclipse' task to be executed. --- gradle/ide.gradle | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gradle/ide.gradle b/gradle/ide.gradle index d0071ebaa3..05b62dfb09 100644 --- a/gradle/ide.gradle +++ b/gradle/ide.gradle @@ -28,6 +28,13 @@ eclipse.classpath.file.whenMerged { classpath -> // Use separate main/test outputs (prevents WTP from packaging test classes) eclipse.classpath.defaultOutputDir = file(project.name+"/eclipse/bin") +eclipse.classpath.file.beforeMerged { classpath -> + classpath.entries.findAll{ it instanceof SourceFolder }.each { + if(it.output.startsWith("build/eclipse")) { + it.output = null + } + } +} eclipse.classpath.file.whenMerged { classpath -> classpath.entries.findAll{ it instanceof SourceFolder }.each { it.output = "build/eclipse/" + it.path.split("/")[1]