Every push or pull request to theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/luisumit/LaPreviaRestobar/llms.txt
Use this file to discover all available pages before exploring further.
main, master, or test branches triggers the Android CI Build GitHub Actions workflow defined in .github/workflows/android-ci.yml. The workflow runs on ubuntu-latest, configures a Java 17 environment with Gradle caching, performs static analysis and tests, produces debug and release APKs, and distributes the debug build to testers via Firebase App Distribution on pushes to main or master.
Workflow Triggers
main or master (not on pull requests or the test branch).
Job Steps
Configure Java 17
Sets up the JDK using the Temurin distribution with Gradle dependency caching enabled. This significantly speeds up subsequent Gradle invocations by reusing cached dependencies across workflow runs.
Create google-services.json per build variant
Decodes the base64-encoded
GOOGLE_SERVICES_JSON secret and writes it to all three variant source sets. If the secret is missing, a warning is printed and an empty JSON object is written to allow the build to continue.Create local.properties
Writes the Firebase API key into
local.properties so the Android Gradle build can read it as a build config field.Make Gradle executable
Grants execute permission to the Gradle wrapper script before any Gradle tasks are invoked. Required on Linux runners where the file may not carry the executable bit after checkout.
Run Detekt static analysis
Executes the Detekt reports are uploaded as artifacts at the end of the workflow from
detekt Gradle task for Kotlin static analysis. The || echo fallback ensures the workflow continues even if the Detekt task is not configured in the project, preventing a hard failure for optional setup.app/build/reports/detekt/.Run Android Lint
Runs Lint HTML and XML reports are uploaded as artifacts from
lintDebug to catch Android-specific code quality issues, XML errors, and resource warnings on the debug variant.app/build/reports/lint-results-debug.*.Run unit tests
Executes all unit tests for the debug variant. Test reports are uploaded as artifacts from
app/build/reports/tests/.Build debug APK
Assembles the debug APK. This step runs on every trigger (push and pull request, all configured branches).Output:
app/build/outputs/apk/debug/app-debug.apkBuild release APK (main/master only)
Assembles the release APK only when the workflow is triggered by a push to Output:
main or master.app/build/outputs/apk/release/app-release.apkUpload APK artifacts
Both debug and release APKs are uploaded as GitHub Actions artifacts for download from the workflow run summary.Detekt reports, Lint reports, and test reports are also uploaded under the
reports artifact on every run (including failed runs via if: always()).Version Code Auto-Increment
ThereleaseNotes field embeds ${{ github.run_number }}, which is the GITHUB_RUN_NUMBER environment variable — an integer that increments automatically with every workflow run in the repository. This value can also be used as the versionCode in your build.gradle to ensure each distributed build has a unique, monotonically increasing version code:
Required GitHub Secrets
Configure the following secrets in your repository under Settings → Secrets and variables → Actions → New repository secret:| Secret | Description |
|---|---|
GOOGLE_SERVICES_JSON | Base64-encoded content of app/google-services.json. Encode with base64 -w 0 app/google-services.json on Linux or [Convert]::ToBase64String([IO.File]::ReadAllBytes("app\google-services.json")) on Windows. |
FIREBASE_API_KEY | Firebase Web API key. Found in google-services.json under clients[].api_key[].current_key. |
FIREBASE_APP_ID | Firebase Android App ID. Found in google-services.json under clients[].client_info.mobilesdk_app_id. |
FIREBASE_TOKEN | Firebase CI token used to authenticate App Distribution uploads. Generate with firebase login:ci. |
Setting Up Secrets Step by Step
Navigate to repository settings
Go to your GitHub repository and click Settings in the top navigation bar.
Add each secret
Click New repository secret, enter the secret name exactly as shown in the table above, paste the value, and click Add secret. Repeat for all four secrets.
Fastlane Lanes
In addition to the GitHub Actions workflow, three Fastlane lanes are available for local development tasks defined infastlane/Fastfile:
| Lane | Command | Description |
|---|---|---|
validate | bundle exec fastlane validate | Compiles the debug Kotlin sources (compileDebugKotlin) to verify the code builds without running a full APK assembly. |
build_debug | bundle exec fastlane build_debug | Assembles a debug APK locally using assembleDebug. |
clean | bundle exec fastlane clean | Runs gradle clean to delete all build outputs and caches. |