use of org.gradle.api.plugins.internal.DefaultJavaPluginExtension in project gradle by gradle.
the class JavaBasePlugin method addExtensions.
private DefaultJavaPluginExtension addExtensions(final ProjectInternal project) {
DefaultToolchainSpec toolchainSpec = project.getObjects().newInstance(DefaultToolchainSpec.class);
SourceSetContainer sourceSets = (SourceSetContainer) project.getExtensions().getByName("sourceSets");
DefaultJavaPluginExtension javaPluginExtension = (DefaultJavaPluginExtension) project.getExtensions().create(JavaPluginExtension.class, "java", DefaultJavaPluginExtension.class, project, sourceSets, toolchainSpec, jvmPluginServices);
project.getConvention().getPlugins().put("java", new DefaultJavaPluginConvention(project, javaPluginExtension));
project.getExtensions().create(JavaToolchainService.class, "javaToolchains", DefaultJavaToolchainService.class, getJavaToolchainQueryService());
return javaPluginExtension;
}
use of org.gradle.api.plugins.internal.DefaultJavaPluginExtension in project gradle by gradle.
the class JavaBasePlugin method apply.
@Override
public void apply(final Project project) {
ProjectInternal projectInternal = (ProjectInternal) project;
project.getPluginManager().apply(BasePlugin.class);
project.getPluginManager().apply(JvmEcosystemPlugin.class);
project.getPluginManager().apply(ReportingBasePlugin.class);
DefaultJavaPluginExtension javaPluginExtension = addExtensions(projectInternal);
configureSourceSetDefaults(project, javaPluginExtension);
configureCompileDefaults(project, javaPluginExtension);
configureJavaDoc(project, javaPluginExtension);
configureTest(project, javaPluginExtension);
configureBuildNeeded(project);
configureBuildDependents(project);
}
Aggregations