Quantcast
Channel: Gradle Forums - Latest posts
Viewing all articles
Browse latest Browse all 19888

Resource filtering in gradle eclipse buildship

$
0
0

:frowning_face: 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. :frowning_face:

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. :frowning_face:


Viewing all articles
Browse latest Browse all 19888

Trending Articles