build(gradle): set kotlin jvmTarget to JVM_21

Java sourceCompatibility/targetCompatibility were already 21, but
the Kotlin compiler defaulted to JVM 17 bytecode, producing a
toolchain skew warning on every build. Align the Kotlin target to
match the Java target.
This commit is contained in:
Enginex0
2026-05-19 03:23:55 +01:00
parent 29b2a85e9f
commit 051a003b33
+7
View File
@@ -2,6 +2,7 @@ import com.android.build.api.artifact.SingleArtifact
import java.io.ByteArrayOutputStream import java.io.ByteArrayOutputStream
import javax.inject.Inject import javax.inject.Inject
import org.gradle.process.ExecOperations import org.gradle.process.ExecOperations
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins { plugins {
alias(libs.plugins.android.application) alias(libs.plugins.android.application)
@@ -65,6 +66,12 @@ android {
} }
} }
kotlin {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_21)
}
}
dependencies { dependencies {
compileOnly(project(":stub")) compileOnly(project(":stub"))
compileOnly(libs.annotation) compileOnly(libs.annotation)