public FileCollection getIncludeRoots() { return new AbstractFileCollection() { @Override public String getDisplayName() { return "Include roots of " + sourceSet.getName(); } public Set<File> getFiles() { return sourceSet.getExportedHeaders().getSrcDirs(); } @Override public TaskDependency getBuildDependencies() { return sourceSet.getBuildDependencies(); } }; }