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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user