# compilerFor

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

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>

Obtain a JavaCompiler matching the JavaToolchainSpec.

#### Return

A `Provider<JavaCompiler>`

#### Parameters

spec

The `JavaToolchainSpec`