The generated classpath contains a source entry with an exclude for all Java files. This means that Java files won’t even be shown in the Package Explorer and also won’t be compiled. Gradle should not add source entry filters.
If you want to add resource copy filters, the correct place to do that is Settings -> JavaCompiler - >Building > Exclude. Also, only the excludes from the “resources” SourceDirectorySet should be considered.