use of org.gradle.jvm.toolchain.JavaToolchainSpec in project spring-boot by spring-projects.
the class ToolchainPlugin method configure.
private void configure(Project project, ToolchainExtension toolchain) {
if (!isJavaVersionSupported(toolchain, toolchain.getJavaVersion())) {
disableToolchainTasks(project);
} else {
JavaToolchainSpec toolchainSpec = project.getExtensions().getByType(JavaPluginExtension.class).getToolchain();
toolchainSpec.getLanguageVersion().set(toolchain.getJavaVersion());
configureTestToolchain(project, toolchain);
}
}
use of org.gradle.jvm.toolchain.JavaToolchainSpec in project spring-boot by spring-projects.
the class JavaPluginAction method configureToolchainConvention.
private void configureToolchainConvention(Project project, BootRun run) {
JavaToolchainSpec toolchain = project.getExtensions().getByType(JavaPluginExtension.class).getToolchain();
JavaToolchainService toolchainService = project.getExtensions().getByType(JavaToolchainService.class);
run.getJavaLauncher().convention(toolchainService.launcherFor(toolchain));
}
Aggregations