use of org.gradle.language.scala.tasks.AbstractScalaCompile in project gradle by gradle.
the class ScalaPlugin method apply.
@Override
public void apply(Project project) {
project.getPluginManager().apply(ScalaBasePlugin.class);
project.getPluginManager().apply(JavaPlugin.class);
final SourceSet main = project.getExtensions().getByType(JavaPluginExtension.class).getSourceSets().getByName("main");
configureScaladoc(project, main);
final Configuration incrementalAnalysisElements = project.getConfigurations().getByName("incrementalScalaAnalysisElements");
String compileTaskName = main.getCompileTaskName("scala");
final TaskProvider<AbstractScalaCompile> compileScala = project.getTasks().withType(AbstractScalaCompile.class).named(compileTaskName);
final Provider<RegularFile> compileScalaMapping = project.getLayout().getBuildDirectory().file("tmp/scala/compilerAnalysis/" + compileTaskName + ".mapping");
compileScala.configure(task -> task.getAnalysisMappingFile().set(compileScalaMapping));
incrementalAnalysisElements.getOutgoing().artifact(compileScalaMapping, configurablePublishArtifact -> configurablePublishArtifact.builtBy(compileScala));
}
Aggregations