Skip to content

Building and Testing

AstorisTheBrave edited this page Jul 4, 2026 · 2 revisions

Building and Testing

Toolchain

  • Kotlin 2.4 with Jetpack Compose (Material 3)
  • Android Gradle Plugin 9.x on Gradle 9.4+ (the wrapper pins the exact version)
  • JDK 17 target (Android Studio's bundled JDK 21 works fine for building)
  • compileSdk 36, minSdk 26 (Android 8.0+)

Note: AGP 9 ships Kotlin support built in. Do not apply the org.jetbrains.kotlin.android plugin; the Kotlin version is pinned in the root build script.

Common commands

export JAVA_HOME="<path-to-jdk>"     # e.g. Android Studio's bundled JBR

./gradlew assembleDebug              # build the debug APK
./gradlew :app:testDebugUnitTest     # run unit tests
./gradlew :app:lintDebug             # run Android Lint (must pass)

The debug APK lands in app/build/outputs/apk/debug/.

Running against Uptime Kuma

Point the app at any reachable Kuma instance. For a quick local server:

docker run -d -p 3001:3001 -v uptime-kuma:/app/data --name uptime-kuma louislam/uptime-kuma:2

From the Android emulator, the host machine is reachable at http://10.0.2.2:3001.

Git hooks

Committed files use ASCII punctuation (a plain -, not an em-dash or en-dash). A shared hook enforces this; enable it once after cloning:

git config core.hooksPath scripts/hooks

The same check runs in CI.

Continuous integration

Every push and pull request runs:

  • an ASCII-punctuation check,
  • assembleDebug, testDebugUnitTest, and lintDebug.

Dependabot keeps Gradle and Actions dependencies current, and workflow static analysis (zizmor) and CodeQL run as security checks. Releases and the changelog are generated from Conventional Commit messages.

Tests

Wire-format parsing is covered by JVM unit tests (the parser is intentionally free of Android types so it runs without a device). Add or update tests for any logic change.

Clone this wiki locally