Skip to content

Export ANDROID_SDK_ROOT alongside ANDROID_HOME#8

Merged
warting merged 1 commit into
mainfrom
claude/export-android-sdk-root-u0fgN
May 21, 2026
Merged

Export ANDROID_SDK_ROOT alongside ANDROID_HOME#8
warting merged 1 commit into
mainfrom
claude/export-android-sdk-root-u0fgN

Conversation

@warting
Copy link
Copy Markdown
Contributor

@warting warting commented May 21, 2026

Summary

Newer Android tooling (AGP 8.x, recent Gradle plugins, the official cmdline-tools sdkmanager) reads ANDROID_SDK_ROOT first and only falls back to ANDROID_HOME when the newer variable is unset. Setting only ANDROID_HOME — as the action did before — causes SDK location not found / Cannot find Android SDK failures on self-hosted runners, even when ANDROID_HOME points at a valid SDK, because the Gradle plugin reads System.getenv("ANDROID_SDK_ROOT") directly.

This change writes both variables to $GITHUB_ENV from the same step. ANDROID_HOME is kept for back-compat with older tooling.

Changes

  • action.yml: renamed the step from Configure ANDROID_HOME to Configure ANDROID_HOME and ANDROID_SDK_ROOT and added a second echo line that exports ANDROID_SDK_ROOT with the same value. Also updated the sdk-path input description.
  • README.md: added an Environment section documenting both variables; updated the inputs table and the "What it does" list.
  • CHANGELOG.md: new file with an Unreleased / 1.0.2 entry noting the additional export.

No new inputs. No breaking changes.

Test plan

  • Configure ANDROID_HOME and ANDROID_SDK_ROOT step appears in workflow logs and writes both variables to $GITHUB_ENV.
  • A subsequent step sees ANDROID_SDK_ROOT set to the same path as ANDROID_HOME.
  • A Gradle build that previously failed with SDK location not found on a self-hosted runner now succeeds.
  • CI passes on existing matrix (ubuntu, macOS arm64).

Follow-up after merge

Per the task description: move the v1 tag alias to point at the new 1.0.2 release once cut. Do not retag v1.0.0 / v1.0.1.


Generated by Claude Code

Newer Android tooling (AGP 8.x, recent Gradle plugins, the cmdline-tools
sdkmanager) reads ANDROID_SDK_ROOT first and only falls back to
ANDROID_HOME when the newer variable is unset. Setting only ANDROID_HOME
causes "SDK location not found" failures on self-hosted runners.

- action.yml: write both vars in the (renamed) "Configure ANDROID_HOME
  and ANDROID_SDK_ROOT" step; update sdk-path input description.
- README.md: document both vars in a new Environment section; update
  inputs table and "What it does".
- CHANGELOG.md: add 1.0.2 entry.
@warting warting marked this pull request as ready for review May 21, 2026 10:22
@warting warting merged commit ec4f446 into main May 21, 2026
21 checks passed
@warting warting deleted the claude/export-android-sdk-root-u0fgN branch May 21, 2026 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants