I’m looking for a way to globally exclude files with certain extensions from being included in processing by Gradle. Example extensions that I’d like ignored are “.rej" and ".orig” (generated by Mercurial), or “*.bak” (generated by some text editors). I would like any files that match the configured pattern to be excluded from all tasks that support an exclusion pattern. So, for example, src/main/resources/someFile.orig would not be included as a resource in an assembled jar, and src/main/java/SomeFile.java.orig would not be considered for processing by license-gradle-plugin.
Ant supports this sort of concept using the defaultexcludes task.