gradle
8.5

# compilerFor

abstract fun compilerFor(config: Action<out Any>): Provider<JavaCompiler>(source)

Obtain a JavaCompiler matching the JavaToolchainSpec, as configured by the provided action.

#### Return

A `Provider<JavaCompiler>`

#### Parameters

config

The configuration of the `JavaToolchainSpec`

abstract fun compilerFor(spec: JavaToolchainSpec): Provider<JavaCompiler>(source)

Obtain a JavaCompiler matching the JavaToolchainSpec.

#### Return

A `Provider<JavaCompiler>`

#### Parameters

spec

The `JavaToolchainSpec`