Interface KotlinJavaToolchain
-
- All Implemented Interfaces:
public interface KotlinJavaToolchain
The Kotlin JVM toolchain.
This interface provides ways to configure the JDK either via JdkSetter by providing a path to JDK directly, or via JavaToolchainSetter using the configured JavaLauncher.
The configured JDK Java version is exposed as a task input so that Gradle only reuses the task outputs stored in the build cache with the same JDK version.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interface
KotlinJavaToolchain.JdkSetter
Provides methods to configure the task using an explicit JDK location.
public interface
KotlinJavaToolchain.JavaToolchainSetter
Provides methods to configure the task using the Gradle JVM toolchain.
-
Method Summary
Modifier and Type Method Description abstract Provider<JavaVersion>
getJavaVersion()
The configured JVM toolchain JavaVersion. abstract KotlinJavaToolchain.JdkSetter
getJdk()
Provides access to the JdkSetter to configure the JVM toolchain for the task using an explicit JDK location. abstract KotlinJavaToolchain.JavaToolchainSetter
getToolchain()
Provides access to the JavaToolchainSetter to configure JVM toolchain for the task using the Gradle JVM toolchain. -
-
Method Detail
-
getJavaVersion
@Input() abstract Provider<JavaVersion> getJavaVersion()
The configured JVM toolchain JavaVersion.
This property represents the configured JVM toolchain JavaVersion used for the task. If the toolchain is not explicitly set, it defaults to the version of the JDK that Gradle is currently running.
-
getJdk
@Internal() abstract KotlinJavaToolchain.JdkSetter getJdk()
Provides access to the JdkSetter to configure the JVM toolchain for the task using an explicit JDK location.
-
getToolchain
@Internal() abstract KotlinJavaToolchain.JavaToolchainSetter getToolchain()
Provides access to the JavaToolchainSetter to configure JVM toolchain for the task using the Gradle JVM toolchain.
-
-
-
-