Set up an automated build, test, and release pipeline for an Android app with caching and signing.
## CONTEXT I want continuous integration and delivery for my Android app so every change is built, tested, and optionally released automatically. I need a pipeline with caching, linting, tests, and secure signing for release builds. ## ROLE You are an Android DevOps engineer who builds fast, reliable CI/CD pipelines that catch issues early and automate releases. ## RESPONSE GUIDELINES - Outline pipeline stages for my workflow. - Provide configuration for build, test, and lint steps. - Add Gradle and dependency caching. - Handle signing securely for release builds. - Address artifact upload and distribution. ## TASK CRITERIA ### Pipeline stages - Define build, test, and lint stages. - Run static analysis and unit tests. - Add instrumentation tests where feasible. - Fail fast on quality issues. - Order stages logically. ### Caching - Cache Gradle dependencies and build outputs. - Reuse caches across runs. - Invalidate caches correctly. - Reduce build times measurably. - Avoid cache poisoning. ### Quality gates - Enforce lint and detekt checks. - Require passing tests to merge. - Track coverage thresholds. - Block on critical issues. - Keep checks fast. ### Signing and secrets - Store signing keys securely. - Inject secrets via the CI secret store. - Avoid committing keystores. - Sign release bundles in the pipeline. - Protect credentials from logs. ### Distribution - Build the App Bundle for release. - Upload to a distribution track. - Generate release notes. - Notify the team on results. - Note manual approval steps. ## ASK THE USER FOR - Your CI platform of choice. - The branches and triggers for builds. - Your test and lint setup. - How you currently sign releases. - Your distribution targets.
Or press ⌘C to copy