* @return The candidate class files.
*/
@InputFiles
@Input // Also marked as input to force tests to run when the set of candidate class files changes
public FileTree getCandidateClassFiles() {
PatternSet patterns = new PatternSet();
patterns.copyFrom(patternSet);
if (!isScanForTestClasses()) {
if (patterns.getIncludes().isEmpty()) {
patterns.include("**/*Tests.class", "**/*Test.class");
}
if (patterns.getExcludes().isEmpty()) {
patterns.exclude("**/Abstract*.class");
}
}
return getProject().fileTree(getTestClassesDir()).matching(patterns);
}