Search in sources :

Example 1 with DefaultToolchainSpec

use of org.gradle.jvm.toolchain.internal.DefaultToolchainSpec 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;
}
Also used : DefaultToolchainSpec(org.gradle.jvm.toolchain.internal.DefaultToolchainSpec) DefaultJavaPluginConvention(org.gradle.api.plugins.internal.DefaultJavaPluginConvention) DefaultJavaPluginExtension(org.gradle.api.plugins.internal.DefaultJavaPluginExtension) DefaultJavaPluginExtension(org.gradle.api.plugins.internal.DefaultJavaPluginExtension) SourceSetContainer(org.gradle.api.tasks.SourceSetContainer)

Aggregations

DefaultJavaPluginConvention (org.gradle.api.plugins.internal.DefaultJavaPluginConvention)1 DefaultJavaPluginExtension (org.gradle.api.plugins.internal.DefaultJavaPluginExtension)1 SourceSetContainer (org.gradle.api.tasks.SourceSetContainer)1 DefaultToolchainSpec (org.gradle.jvm.toolchain.internal.DefaultToolchainSpec)1