From 8c51fe0bbe2293e417c0d96bd012429c07d833ca Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Fri, 22 May 2026 07:58:07 -0400 Subject: [PATCH] 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) --- android/app/build.gradle.kts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index 9b9a1e97..1cd9db81 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -97,6 +97,17 @@ detekt { 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().configureEach { + jvmTarget = "17" +} +tasks.withType().configureEach { + jvmTarget = "17" +} + dependencies { implementation(libs.androidx.core.ktx) implementation(libs.androidx.lifecycle.runtime.compose)