Skip to content

Instantly share code, notes, and snippets.

@GavinRay97
Created January 23, 2023 14:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GavinRay97/bd13b99727f600e7db822e0f190db338 to your computer and use it in GitHub Desktop.
Save GavinRay97/bd13b99727f600e7db822e0f190db338 to your computer and use it in GitHub Desktop.
Kotlin Gradle - How to use preview JDK's
val JDK_21_PATH = "/home/user/.sdkman/candidates/java/21.ea.6-open"
tasks.withType<org.jetbrains.kotlin.gradle.tasks.UsesKotlinJavaToolchain>().configureEach {
kotlinJavaToolchain.jdk.use(JDK_21_PATH, JavaVersion.VERSION_21)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment