premex-ab/Setup Android CLI
Install and cache Google's agent-first android CLI plus SDK packages. Drop-in setup-android replacement.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| packages | SDK packages to install via `android sdk install`. Space- or newline-separated, slash syntax (e.g. `platforms/android-34 build-tools/34.0.0 platform-tools`). Leave empty to install only the CLI with no SDK packages. | no | "" |
| sdk-path | Override where the Android SDK is installed. Defaults to `~/Library/Android/sdk` on macOS and `~/Android/Sdk` on Linux. The chosen path is exported as `ANDROID_HOME` and `ANDROID_SDK_ROOT` for subsequent steps. | no | "" |
| cache | Cache the CLI's unpacked resources (`~/.android/bin`) and the SDK between runs. Set to `false` to disable. Does not affect Gradle caching - use `gradle/actions/setup-gradle@v4` for that. | no | true |
| cache-key | Extra input appended to the cache key. Change to bust the cache. The default key already includes OS, arch, and the hash of `**/libs.versions.toml` / `**/build.gradle*`. | no | "" |
| no-metrics | Pass `--no-metrics` on `android` invocations made by this action (opts out of Google's usage telemetry). Defaults to `true`. | no | true |
| install-url-base | Override the base URL for downloading the CLI binary. The action appends `/<platform>/android` (for example `/linux_x86_64/android`). Useful for internal mirrors or air-gapped environments. Defaults to Google's redirector. | no | https://redirector.gvt1.com/edgedl/android/cli/latest |
Outputs
| name | description |
|---|---|
| sdk-path | Absolute path to the Android SDK managed by this action. |
| cli-version | Version string returned by `android --version`. |
| cache-hit | Whether the `~/.android/bin` + SDK cache was hit. Empty when caching is disabled. |