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