This piece of code works perfectly in dynamically typed Groovy
buildDirectory.traverse(type: FILES, nameFilter: ~/dependency-updates-report.xml/) {
reports << it
}
but when adding @CompileStatic to the class it get an error, something along the line
'traverse' in 'org.codehaus.groovy.runtime.ResourceGroovyMethods' cannot be applied to ...
Is the Map parameter the problem here?
EDIT buildDirectory is of type java.io.File and is injected.