<@U19P7SPFW> <@U0QBCLV62> What is the recommended ...
# gradle
j
@eskatos @bamboo What is the recommended way to create a
FileCollection
in plugins? This is what the spotless plugin is doing but
UnionFileCollection
is an
internal
api.
Copy code
UnionFileCollection union = new UnionFileCollection();
for (SourceSet sourceSet : javaPlugin.getSourceSets()) {
    union.add(sourceSet.getAllSource().filter(file -> {
        String name = file.getName();
        return name.endsWith(".kt") || name.endsWith(".kts");
    }));
}