# getToolchain

abstract fun getToolchain(): JavaToolchainSpec

Gets the project wide toolchain requirements that will be used for tasks requiring 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