File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
src/main/java/org/gradlex/javamodule/dependencies/initialization Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 2222import org .gradle .api .provider .ValueSourceParameters ;
2323
2424import java .io .File ;
25+ import java .io .FileFilter ;
2526import java .util .Arrays ;
2627import java .util .List ;
2728import java .util .stream .Collectors ;
@@ -32,11 +33,17 @@ public abstract class ValueSourceDirectoryListing implements ValueSource<List<St
3233 @ Override
3334 public List <String > obtain () {
3435 File file = getParameters ().getDir ().get ();
35- String [] list = file .list ();
36+ File [] list = file .listFiles (new FileFilter () {
37+ @ Override
38+ public boolean accept (File file ) {
39+ return file .isDirectory ();
40+ }
41+ });
3642 if (list == null ) {
3743 throw new RuntimeException ("Failed to inspect: " + file .getAbsolutePath ());
3844 }
3945 return Arrays .stream (list )
46+ .map (File ::getName )
4047 .filter (x -> !getParameters ().getExclusions ().get ().contains (x ))
4148 .filter (x -> getParameters ().getRegexExclusions ().get ().stream ().noneMatch (x ::matches ))
4249 .sorted ()
You can’t perform that action at this time.
0 commit comments