We don’t use (or want to use) separate *.java code and resource folders but I tried something similar to above to set up the excludes on the main source directory. I was able to configure Gradle Eclipse plugin to set them in the
.classpath
files it generates:
eclipse {
classpath {
file {
whenMerged {
entries.each { entry ->
if (entry instanceof org.gradle.plugins.ide.eclipse.model.SourceFolder) {
entry.excludes += ['**']
}
}
}
}
}
}
(Above is verbose because I had some trouble filtering the collection otherwise)…
But none of this takes effect through Buildship. What to do?
Edit 1: https://github.com/eclipse/buildship/issues/271 is still open.
Edit 2: Even if I generate .classpath
files before importing projects (the same way Buildship would create them) they get recreated when the projects are imported … without filters.