Package org.gradle.jvm.toolchain
Interface JavaToolchainService
public interface JavaToolchainService
Allows to query for toolchain managed tools, like
JavaCompiler
, JavaLauncher
and JavadocTool
.
An instance of this service is available for injection into tasks, plugins and other types.
- Since:
- 6.7
-
Method Summary
Modifier and TypeMethodDescriptioncompilerFor
(Action<? super JavaToolchainSpec> config) Obtain aJavaCompiler
matching theJavaToolchainSpec
, as configured by the provided action.compilerFor
(JavaToolchainSpec spec) Obtain aJavaCompiler
matching theJavaToolchainSpec
.javadocToolFor
(Action<? super JavaToolchainSpec> config) Obtain aJavadocTool
matching theJavaToolchainSpec
, as configured by the provided action.Obtain aJavadocTool
matching theJavaToolchainSpec
.launcherFor
(Action<? super JavaToolchainSpec> config) Obtain aJavaLauncher
matching theJavaToolchainSpec
, as configured by the provided action.launcherFor
(JavaToolchainSpec spec) Obtain aJavaLauncher
matching theJavaToolchainSpec
.
-
Method Details
-
compilerFor
Obtain aJavaCompiler
matching theJavaToolchainSpec
, as configured by the provided action.- Parameters:
config
- The configuration of theJavaToolchainSpec
- Returns:
- A
Provider<JavaCompiler>
-
compilerFor
Obtain aJavaCompiler
matching theJavaToolchainSpec
.- Parameters:
spec
- TheJavaToolchainSpec
- Returns:
- A
Provider<JavaCompiler>
-
launcherFor
Obtain aJavaLauncher
matching theJavaToolchainSpec
, as configured by the provided action.- Parameters:
config
- The configuration of theJavaToolchainSpec
- Returns:
- A
Provider<JavaLauncher>
-
launcherFor
Obtain aJavaLauncher
matching theJavaToolchainSpec
.- Parameters:
spec
- TheJavaToolchainSpec
- Returns:
- A
Provider<JavaLauncher>
-
javadocToolFor
Obtain aJavadocTool
matching theJavaToolchainSpec
, as configured by the provided action.- Parameters:
config
- The configuration of theJavaToolchainSpec
- Returns:
- A
Provider<JavadocTool>
-
javadocToolFor
Obtain aJavadocTool
matching theJavaToolchainSpec
.- Parameters:
spec
- TheJavaToolchainSpec
- Returns:
- A
Provider<JavadocTool>
-