don't fail on missing source dirs

This commit is contained in:
Robert Muir 2015-12-18 11:58:18 -05:00
parent 94d6b22137
commit e82808917c
1 changed files with 4 additions and 1 deletions

View File

@ -58,9 +58,12 @@ public class LicenseHeadersTask extends DefaultTask {
// checks all the java sources (allJava)
for (SourceSet set : project.sourceSets) {
for (File dir : set.allJava.srcDirs) {
// sometimes these dirs don't exist, e.g. site-plugin has no actual java src/main...
if (dir.exists()) {
ant.fileset(dir: dir)
}
}
}
// BSD 4-clause stuff (is disallowed below)
substringMatcher(licenseFamilyCategory: "BSD4 ",