diff --git a/skippy-gradle/src/main/java/io/skippy/gradle/core/SourceFileCollector.java b/skippy-gradle/src/main/java/io/skippy/gradle/core/SourceFileCollector.java index 0de0a8b..eac6b73 100644 --- a/skippy-gradle/src/main/java/io/skippy/gradle/core/SourceFileCollector.java +++ b/skippy-gradle/src/main/java/io/skippy/gradle/core/SourceFileCollector.java @@ -6,8 +6,11 @@ import java.io.File; import java.util.ArrayList; +import java.util.Comparator; import java.util.List; +import static java.util.Comparator.comparing; + public class SourceFileCollector { public static List getAllSources(Project project) { @@ -16,7 +19,7 @@ public static List getAllSources(Project project) { for (SourceSet sourceSet : sourceSetContainer) { result.addAll(getSourceFiles(sourceSet)); } - return result; + return result.stream().sorted(comparing(SourceFile::getFullyQualifiedClassName)).toList(); } private static List getSourceFiles(SourceSet sourceSet) {