Fix Gradle toolchain resolution on macOS/Corretto

Replace jvmToolchain(17) with jvmToolchain(21) + explicit kotlinOptions
jvmTarget=17 + java sourceCompatibility/targetCompatibility. Avoids
toolchain provisioning errors when the JDK is present but not registered
via the Gradle toolchain API.
This commit is contained in:
Kyle Bolen
2026-07-28 03:38:02 +00:00
parent c4608e9c0e
commit bbc764dbcb

View File

@@ -10,7 +10,16 @@ group = "com.bolenpad.photophetch"
version = "1.0.0"
kotlin {
jvmToolchain(17)
jvmToolchain(21)
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.jvmTarget = "17"
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
dependencies {