Skip to content

Commit 6fed79c

Browse files
committed
Ensure buildSrc is only added once to eclipse
1 parent a6387dc commit 6fed79c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

build.gradle

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -661,8 +661,11 @@ configure(rootProject) {
661661
apply from: "${gradleScriptDir}/jdiff.gradle"
662662

663663
eclipse.classpath.file.whenMerged { classpath ->
664-
classpath.entries.add(0, new org.gradle.plugins.ide.eclipse.model.SourceFolder(
665-
"buildSrc/src/main/groovy", null))
664+
def sourceFolder = new org.gradle.plugins.ide.eclipse.model.SourceFolder(
665+
"buildSrc/src/main/groovy", null)
666+
if(!classpath.entries.contains(sourceFolder)) {
667+
classpath.entries.add(0, sourceFolder)
668+
}
666669
}
667670

668671
reference {

0 commit comments

Comments
 (0)