# Haven Development Guide Haven is an Android application with a multi-module Gradle architecture using Kotlin, Jetpack Compose, Coroutines, and Hilt. ## Build & Test Commands ### Unit Tests - **Run all unit tests:** ```bash ./gradlew testDebugUnitTest :app:testArm64FullDebugUnitTest -PexcludeSshlibContractTests=true -PskipWaylandNatives=true -PskipFfmpegNatives=true ``` - **Run specific module tests (force fresh rerun):** ```bash ./gradlew ::testDebugUnitTest --rerun-tasks -PskipWaylandNatives=true -PskipFfmpegNatives=true ``` - **Run a specific test class:** ```bash ./gradlew ::testDebugUnitTest --tests "sh.haven.." --rerun-tasks -PskipWaylandNatives=true -PskipFfmpegNatives=true ``` ### Build & Verification - **Assemble Debug APK:** ```bash ./gradlew :app:assembleArm64FullDebug -PtargetAbi=arm64 -PskipWaylandNatives=true -PskipFfmpegNatives=true ``` - **Fast Source Checks:** ```bash ./scripts/check-changelog.sh ./scripts/check-i18n-hardcoded.sh python3 scripts/check-i18n-coverage.py ``` ## Gradle & Compiler Invariants - **Kotlin Classes:** Unit test Kotlin classes compile into `/build/intermediates/built_in_kotlinc/debugUnitTest/` and `/build/tmp/kotlin-classes/debugUnitTest/` (not javac). - **Test Results:** XML test output is located at `/build/test-results/testDebugUnitTest/` and HTML reports at `/build/reports/tests/testDebugUnitTest/index.html`. - **Task Caching:** AGP skips unchanged tasks (UP-TO-DATE). If testing newly modified code, use `--rerun-tasks --info`. Do not diagnose build script configurations unless a compilation error is explicitly thrown.