Export ANDROID_SDK_ROOT alongside ANDROID_HOME#8
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Newer Android tooling (AGP 8.x, recent Gradle plugins, the official cmdline-tools
sdkmanager) readsANDROID_SDK_ROOTfirst and only falls back toANDROID_HOMEwhen the newer variable is unset. Setting onlyANDROID_HOME— as the action did before — causesSDK location not found/Cannot find Android SDKfailures on self-hosted runners, even whenANDROID_HOMEpoints at a valid SDK, because the Gradle plugin readsSystem.getenv("ANDROID_SDK_ROOT")directly.This change writes both variables to
$GITHUB_ENVfrom the same step.ANDROID_HOMEis 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 secondecholine that exportsANDROID_SDK_ROOTwith the same value. Also updated thesdk-pathinput 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_ROOTstep appears in workflow logs and writes both variables to$GITHUB_ENV.ANDROID_SDK_ROOTset to the same path asANDROID_HOME.SDK location not foundon a self-hosted runner now succeeds.Follow-up after merge
Per the task description: move the
v1tag alias to point at the new1.0.2release once cut. Do not retagv1.0.0/v1.0.1.Generated by Claude Code