use FileTree instead of SourceDirectorySet
@@ -6,7 +6,6 @@ import org.gradle.api.Action;
import org.gradle.api.Plugin;
import org.gradle.api.Project;
import org.gradle.api.file.FileTree;
-import org.gradle.api.file.SourceDirectorySet;
import org.gradle.api.plugins.JavaPluginConvention;
import org.gradle.api.tasks.util.PatternSet;
@@ -44,9 +43,9 @@ public class PluginDiscoveryPlugin implements Plugin<Project> {
private Set<File> discoverGradlePluginPropertyFiles(Project project) {
final JavaPluginConvention java = project.getConvention().getPlugin(JavaPluginConvention.class);
- SourceDirectorySet resources = java.getSourceSets().getByName("main").getResources();
- FileTree tree = resources.matching(new PatternSet().include("META-INF/gradle-plugins/*.properties"));
- return tree.getFiles();
+ FileTree resources = java.getSourceSets().getByName("main").getResources();
+ FileTree plugins = resources.matching(new PatternSet().include("META-INF/gradle-plugins/*.properties"));
+ return plugins.getFiles();
}
static String generatePluginName(String fileName) {
