If you remove all default excludes from the Ant DirectoryScanner like e. g. described in my work-around for GRADLE-1883, or via the ant defaultexcludes task, no files are included anymore at all, thus the new unlikely-to-match default exclude in that work-around.