# JavaToolchainService

@ServiceScope(value = Project::class)
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

## Functions

compilerFor
Link copied to clipboard
abstract fun compilerFor(config: Action<in JavaToolchainSpec>): Provider<JavaCompiler>
Obtain a JavaCompiler matching the JavaToolchainSpec, as configured by the provided action.
abstract fun compilerFor(spec: JavaToolchainSpec): Provider<JavaCompiler>
Obtain a JavaCompiler matching the JavaToolchainSpec.
javadocToolFor
Link copied to clipboard
abstract fun javadocToolFor(config: Action<in JavaToolchainSpec>): Provider<JavadocTool>
Obtain a JavadocTool matching the JavaToolchainSpec, as configured by the provided action.
abstract fun javadocToolFor(spec: JavaToolchainSpec): Provider<JavadocTool>
Obtain a JavadocTool matching the JavaToolchainSpec.
launcherFor
Link copied to clipboard
abstract fun launcherFor(config: Action<in JavaToolchainSpec>): Provider<JavaLauncher>
Obtain a JavaLauncher matching the JavaToolchainSpec, as configured by the provided action.
abstract fun launcherFor(spec: JavaToolchainSpec): Provider<JavaLauncher>
Obtain a JavaLauncher matching the JavaToolchainSpec.