From da942624a4abd82797f563cf8c57f1124c5de435 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Mon, 24 Aug 2026 07:54:01 +0000 Subject: Add TDD quality gate: detekt, coverage tracking, pre-commit hook; fix theme crash risk CLAUDE.md now documents mandatory red-green-refactor TDD, a per-commit quality gate (build, tests, lint, detekt, coverage-non-decrease, WebView-JS justification, manifest permission diff, secret scan), and why each check exists (tracing back to real bugs this audit found). Wires up detekt (static analysis) and a standalone Jacoco setup (scoped to data/readability/opml/work/stash -- ui/ Compose screens are impractical to unit-test for coverage) via app/build.gradle.kts. Bumped Kotlin/KSP to 2.0.21/2.0.21-1.0.28 to match detekt 1.23.8's compatibility requirement. Also fixes the themes.xml bug the lint gate immediately caught: Theme.FeedReader's parent required API 29 while minSdk is 26 -- a real crash risk on Android 8.0-9.0 devices. Swapped to the plain (non-DayNight) DeviceDefault parent, since Compose already owns all real theming via a hardcoded darkColorScheme() regardless of system day/night state. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_017GMEkHeqKz6FLkmizowBTK --- build.gradle.kts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'build.gradle.kts') diff --git a/build.gradle.kts b/build.gradle.kts index ed1c30b..d79f059 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,7 +1,8 @@ plugins { id("com.android.application") version "8.3.2" apply false - id("org.jetbrains.kotlin.android") version "2.0.0" apply false - id("org.jetbrains.kotlin.plugin.serialization") version "2.0.0" apply false - id("org.jetbrains.kotlin.plugin.compose") version "2.0.0" apply false - id("com.google.devtools.ksp") version "2.0.0-1.0.22" apply false + id("org.jetbrains.kotlin.android") version "2.0.21" apply false + id("org.jetbrains.kotlin.plugin.serialization") version "2.0.21" apply false + id("org.jetbrains.kotlin.plugin.compose") version "2.0.21" apply false + id("com.google.devtools.ksp") version "2.0.21-1.0.28" apply false + id("io.gitlab.arturbosch.detekt") version "1.23.8" apply false } -- cgit v1.2.3