# toolchain

abstract fun toolchain(action: Action<in JavaToolchainSpec>): JavaToolchainSpec

Configures the project wide toolchain requirements for tasks that require a tool from the toolchain (e.g. org.gradle.api.tasks.compile.JavaCompile).

Configuring a toolchain cannot be used together with `sourceCompatibility` or `targetCompatibility` on this extension. Both values will be sourced from the toolchain.

#### Since

6.7