fix(android): pin detekt jvm-target to 17
detekt 1.23.7 bundles kotlin-compiler-embeddable 1.9.10 whose --jvm-target validator only accepts up to 22. Detekt auto-detected the runner's JDK 25 and choked. Pin to 17 (matches our compileOptions.targetCompatibility + kotlin.compilerOptions.jvmTarget). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -97,6 +97,17 @@ detekt {
|
|||||||
autoCorrect = false
|
autoCorrect = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// detekt 1.23.7 bundles kotlin-compiler-embeddable 1.9.10, which caps
|
||||||
|
// `--jvm-target` at 22. The runner's JDK is 25 and detekt would auto-
|
||||||
|
// detect that, so pin the analyzer target to match our actual bytecode
|
||||||
|
// target (17).
|
||||||
|
tasks.withType<io.gitlab.arturbosch.detekt.Detekt>().configureEach {
|
||||||
|
jvmTarget = "17"
|
||||||
|
}
|
||||||
|
tasks.withType<io.gitlab.arturbosch.detekt.DetektCreateBaselineTask>().configureEach {
|
||||||
|
jvmTarget = "17"
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(libs.androidx.core.ktx)
|
implementation(libs.androidx.core.ktx)
|
||||||
implementation(libs.androidx.lifecycle.runtime.compose)
|
implementation(libs.androidx.lifecycle.runtime.compose)
|
||||||
|
|||||||
Reference in New Issue
Block a user