ClasspathScanPlugin implements Plugin<Project> { @Override public void apply(Project project) { this.project = project; project.getPlugins().withType(JavaPlugin.class, javaPlugin -> project.getConvention() .getPlugin(JavaPluginConvention.class) .getSourceSets() .all(this::configureClasspathScan) ); }  @Override void apply(Project project);  }
@Test void apply_alone() { this.project.getPlugins().apply(ClasspathScanPlugin.class); }
@Test void apply_beforeJava() { this.project.getPlugins().apply(ClasspathScanPlugin.class); this.project.getPlugins().apply(JavaPlugin.class); checkForGeneratedTasks(); }
@Test void apply_afterJava() { this.project.getPlugins().apply(JavaPlugin.class); this.project.getPlugins().apply(ClasspathScanPlugin.class); checkForGeneratedTasks(); }