Found what I was looking for: sourceSets.main.java.filter.includes
is “[**/*.java]” by default.
What really confuses me is that sourceSets.main.java.includes
is “[]” by default. This comes from https://docs.gradle.org/nightly/javadoc/org/gradle/api/file/SourceDirectorySet.html extending from https://docs.gradle.org/nightly/javadoc/org/gradle/api/tasks/util/PatternFilterable.html.
I followed the hint from here to copy files from sourceSets.main.java
too, doing it like that now:
sourceSets
{
main
{
resources
{
source(sourceSets.main.java)
filter.include("**/*.*")
filter.exclude("**/*.java", "**/*.log")
filter.exclude("**/.svn/*", "**/.git*")
}
}
}
This ensures that resources files under src/main/java are copied into the JAR because the task processResources is taking into account every source directory configured for the source set sourceSets.main.resources
.