GHBanner
# Munich Departures An Android application for Munich public transport departures, featuring devshell and automated Gitea CI/CD workflows. View your app in AI Studio: https://ai.studio/apps/9c59cfb4-12a7-42ef-ae43-53c4408c63ad ## Development Environment (Nix / Devbox) This project contains a Nix development shell setup (`flake.nix` & `devbox.json`) providing consistent tooling (JDK 17 and Android SDK Platform 36 / Build-tools 36.0.0). ### Entering the Devshell If you have [direnv](https://direnv.net/) installed, it will automatically load when you enter this directory. Alternatively, you can use: ```bash nix develop # or devbox shell ``` ### Build Commands All Gradle commands should be run within the devshell environment: - `nix develop -c ./gradlew build` - Build the entire project - `nix develop -c ./gradlew assembleDebug` - Build debug APK - `nix develop -c ./gradlew assembleRelease` - Build release APK - `nix develop -c ./gradlew test` - Run all unit tests ## Local Setup 1. **Prerequisites**: [Android Studio](https://developer.android.com/studio) or the Nix development shell. 2. Create a file named `.env` in the project root directory and set your Gemini API key (see `.env.example` for details): ```env GEMINI_API_KEY=your_gemini_api_key_here ``` 3. Run the app on an emulator or physical device. ## Gitea CI/CD & Releases The project features an automated Gitea release workflow configured in `.gitea/workflows/release.yml`. ### Creating a Release To publish a new version: 1. Bump the `versionName` in `app/build.gradle.kts` (e.g. `versionName = "0.1.0"`) and increment the `versionCode`. 2. Commit the bump and push it: ```bash git commit -am "chore(release): bump version to 0.1.0" git push origin main ``` 3. Create and push a tag matching `v*`: ```bash git tag v0.1.0 git push origin v0.1.0 ``` 4. The Gitea Actions runner will detect the tag, build the release variant of the APK, rename it to `munich-departures-v0.1.0.apk`, and upload it directly to Gitea Releases.