This file contains instructions for AI agents working on the GymExe repository.
- NO LOG REPORTS: Do not generate file-based log reports (e.g.,
error_log.txt) or paste massive logs into the chat. Users view logs directly in their terminal by re-running commands. - Deep Planning: Always engage in "Deep Planning Mode" before starting a task. Verify requirements through questions until absolute certainty is reached.
- Name: GymExe
- Package:
com.sjn.gym - Purpose: A modular, offline-first workout tracker for gym goers.
- Tech Stack:
- Android (Kotlin 2.3.10 using Java 25)
- Jetpack Compose (UI)
- Hilt (Dependency Injection)
- Room (Local Database)
- DataStore (Preferences)
- GitHub Actions (CI/CD)
- Language: Kotlin (Latest Stable)
- UI: Jetpack Compose (avoid XML layouts where possible)
- Architecture: Clean Architecture (MVVM/MVI)
core/: Shared modules (UI, Data, Model)feature/: Feature specific modules (Workout, Settings, Onboarding)app/: Entry point and navigation
- Testing:
- Unit Tests for ViewModels and Domain logic.
- UI Tests using Compose Test Rule.
- Linting: Strict mode enabled.
- Spotless: Enforces ktfmt (kotlinlang style) formatting.
- Signing: Uses
app/debug.keystore(tracked in git) with default credentials for simplicity. - Minification: Always ensure Release builds are minified (
minifyEnabled true).
- Flavors:
dev: For development and PR checks (Debuggable, suffix-dev). Includes Dev Tools (Chucker, LeakCanary, File Logging).stable: For production release (Minified).
- Build Types:
release: Minified, optimized, no test rules. Used fordevRelease(manual QA) andstableRelease(Production).debug: Non-minified, debuggable.benchmark: Inherits fromrelease. Minified but includes extra ProGuard rules to allow instrumented tests to run. Used for CI (connectedDevBenchmarkAndroidTest).
- Local: Standard Android Studio setup.
- CI: GitHub Actions (Ubuntu latest).
The project uses the Foojay Toolchains Resolver, which automatically downloads the required JDK (Java 25) during the build. No manual JDK installation is required.
To initialize the environment and run initial checks:
./gradlew sC lDD tDDUT bH aDD --continue -qRun this before submitting any change:
./gradlew sA lDD tDDUT aDD bH -PprintDependencies -s --continue- Build Debug APK (Dev):
./gradlew aDD -s --continue- Build Release APK (Dev):
./gradlew aDR -s --continue- Build Release APK (Stable):
./gradlew aSR -s --continue- Run Unit Tests:
./gradlew tDDUT -s --continue- Run Android Lint:
./gradlew lintDevDebug -s --continue- Format Code (Kotlin & YAML):
./gradlew spotlessApply -s --continue- Run Architecture Linter (Konsist):
./gradlew :core:model:test --tests "*Konsist*" -s --continue- Record Roborazzi Baseline:
./gradlew rRDD -s- Verify Roborazzi Baseline:
./gradlew vRDD -s- Compare Roborazzi Baseline:
./gradlew cRDD -s- Generate HTML Test Coverage:
./gradlew kHR -s- Generate XML Test Coverage:
./gradlew kXR -s- Sync Project:
./gradlew --refresh-dependencies- Clean Build:
./gradlew clean build- Dependency Management: We use Mend Renovate for fully automated dependency updates.
- Dependency Analysis: Build Health
./gradlew bH -Dorg.gradle.unsafe.isolated-projects=false -PprintDependencies- Develocity Build Scans & Cache:
Build scans and local caching are automatically enabled via
settings.gradle.kts. Use--no-scanif you wish to bypass build scan generation for a particular run.