# compilerFor

abstract fun compilerFor(config: Action<in JavaToolchainSpec>): Provider<JavaCompiler>(source)

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

#### Return

A `Provider<JavaCompiler>`

#### Since

6.7

#### 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>`

#### Since

6.7

#### Parameters

spec

The `JavaToolchainSpec`