Ensure buildSrc is only added once to eclipse

This commit is contained in:
Phillip Webb 2012-12-10 20:54:56 -08:00
parent a6387dc725
commit 6fed79cb10
1 changed files with 5 additions and 2 deletions

View File

@ -661,8 +661,11 @@ configure(rootProject) {
apply from: "${gradleScriptDir}/jdiff.gradle" apply from: "${gradleScriptDir}/jdiff.gradle"
eclipse.classpath.file.whenMerged { classpath -> eclipse.classpath.file.whenMerged { classpath ->
classpath.entries.add(0, new org.gradle.plugins.ide.eclipse.model.SourceFolder( def sourceFolder = new org.gradle.plugins.ide.eclipse.model.SourceFolder(
"buildSrc/src/main/groovy", null)) "buildSrc/src/main/groovy", null)
if(!classpath.entries.contains(sourceFolder)) {
classpath.entries.add(0, sourceFolder)
}
} }
reference { reference {