Skip to content

Commit fa9c0a3

Browse files
committed
Fix Eclipse source folder nesting errors
1 parent 569a966 commit fa9c0a3

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

build.gradle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import de.undercouch.gradle.tasks.download.Download
2+
import javax.inject.Inject
23

34
plugins {
45
// https://plugins.gradle.org/plugin/com.gradleup.shadow
@@ -219,6 +220,11 @@ allprojects { currentProj ->
219220
eclipse.classpath {
220221
defaultOutputDir = file("build/default")
221222
file.whenMerged { cp ->
223+
// Remove bare 'src/main' source folder entries that cause Eclipse nesting errors.
224+
cp.entries.removeAll { e ->
225+
e instanceof org.gradle.plugins.ide.eclipse.model.SourceFolder && e.path == 'src/main'
226+
}
227+
222228
cp.entries.forEach { cpe ->
223229
if (cpe instanceof org.gradle.plugins.ide.eclipse.model.SourceFolder) {
224230
cpe.output = cpe.output.replace "bin/", "build/classes/java/"

0 commit comments

Comments
 (0)