Merge pull request #14244 from LeddaZ/kotlin-compilerdsl

Android: Use compilerOptions block to specify JVM version
This commit is contained in:
JosJuice 2026-01-14 18:53:37 +01:00 committed by GitHub
commit a80734138e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 4 deletions

View File

@ -1,3 +1,5 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
@ -23,8 +25,10 @@ android {
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
kotlin {
compilerOptions {
jvmTarget = JvmTarget.fromTarget("17")
}
}
lint {

View File

@ -1,4 +1,5 @@
import com.android.build.api.dsl.ManagedVirtualDevice
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins {
id("com.android.test")
@ -15,8 +16,10 @@ android {
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
kotlin {
compilerOptions {
jvmTarget = JvmTarget.fromTarget("17")
}
}
defaultConfig {