Skip to content

Building from Source

M57 edited this page Nov 14, 2026 · 2 revisions

Prerequisites

  • JDK 21+ (used for Kotlin compilation and the Gradle toolchain).
  • An Android SDK matching the compile SDK in app/build.gradle.kts, from Android Studio or the Nix development environment. Set ANDROID_HOME or sdk.dir in local.properties.

Build and install

git clone https://github.com/Hy4ri/hermes-mobile.git
cd hermes-mobile
./gradlew assembleDebug
adb install app/build/outputs/apk/debug/app-debug.apk

For release builds, set the keystore environment variables (KEYSTORE_PATH, KEYSTORE_PASSWORD, KEY_ALIAS, KEY_PASSWORD). Or let the GitHub Actions release workflow build on a v* tag push.

Nix emulator

The Nix development shell turns on physical keyboard input in an existing hermes_dev AVD. It respects ANDROID_AVD_HOME and ANDROID_USER_HOME, defaulting to ~/.android/avd. The shell does not create the AVD, so create hermes_dev first.

Close any running emulator, then cold boot once to apply the setting:

nix develop --command emulator -avd hermes_dev -no-snapshot-load

Later launches can omit -no-snapshot-load.

Project structure

app/src/main/java/com/m57/hermescontrol/
├── data/          # Local (Room, AuthManager), Remote (Retrofit, OkHttp), WS (WebSocket), Models
├── notification/  # Foreground service + inline reply for chat notifications
├── theme/         # Preset-based design system (7 themes), status colors, spacing, typography
├── ui/            # Compose feature screens + common components (HermesScaffold, StateViews)
├── util/          # CronExpressionFormatter, LocaleContextWrapper
└── Navigation*.kt # Navigation3 wiring, keys, screen registry, controller

Tech stack

  • Language: Kotlin with KSP
  • UI: Jetpack Compose, Material 3 / Material You
  • Navigation: Navigation3
  • Networking: Retrofit, OkHttp, Kotlinx Serialization
  • Database: Room with SQLCipher encryption
  • Security: EncryptedSharedPreferences (AES256-GCM), DataStore
  • Images: Coil
  • Testing: JUnit, MockK, Turbine, Espresso, Compose UI testing
  • Formatting: ktlint 1.8.0 (checked in CI)

Dependency versions live in gradle/libs.versions.toml. Build configuration and dependency scopes live in app/build.gradle.kts.

Clone this wiki locally