if (scanTargetPatterns != null) {
for (ScanTargetPattern scanTargetPattern : scanTargetPatterns) {
ConfigurableFileTree files = getProject().fileTree(scanTargetPattern.getDirectory());
files.include(scanTargetPattern.getIncludes());
files.exclude(scanTargetPattern.getExcludes());
List<File> currentTargets = getExtraScanTargets();
if (currentTargets != null && !currentTargets.isEmpty()) {
currentTargets.addAll(files.getFiles());
} else {
setExtraScanTargets((List) files.asType(List.class));