gradle
8.5

# JavaToolchainService

interface JavaToolchainService(source)

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.

## Functions

compilerFor
Link copied to clipboard
abstract fun compilerFor(config: Action<out Any>): 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<out Any>): 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<out Any>): 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.