Skip preview NDK; detect all SDK versions from manifest under one preview filter - #73
Merged
Merged
Conversation
PR #72 fixed the preview platform but the build still failed: the NDK 30.0.14904198 is itself a preview package (uses android-sdk-preview-license), so sdkmanager still demanded the preview license. The <codename> check only catches *platform* previews; NDK previews are marked by their license instead. Rather than chase one preview axis at a time, detect all three versions (platform, build-tools, NDK) from the repository manifest under one unified preview filter: skip any package that is obsolete, carries a <codename> element, or uses android-sdk-preview-license. This also removes the cmdline-tools download / `sdkmanager --list` path, which was the source of the preview leakage. - Dockerfile: NDK_VERSION 30.0.14904198 -> 29.0.14206865 (latest stable) - check-sdk-updates: single manifest-based detection for all three versions Verified against the live manifest: platform=36.1, build-tools=37.0.0, ndk=29.0.14206865; all preview packages excluded. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Updates the Android SDK/NDK version-detection logic used by the automated update workflow so it selects only stable packages (avoiding preview-license prompts that break unattended sdkmanager installs), and pins the Docker image to a stable NDK.
Changes:
- Pin
NDK_VERSIONin the Dockerfile from preview30.0.14904198to stable29.0.14206865. - Replace
sdkmanager --list-based detection incheck-sdk-updates.ymlwith manifest (repository2-3.xml) parsing for platform/build-tools/NDK, filtering out obsolete,<codename>(platform previews), andandroid-sdk-preview-licensepackages.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| Dockerfile | Pins the container build to a stable NDK version to avoid preview-license prompts. |
| .github/workflows/check-sdk-updates.yml | Switches SDK version discovery to manifest parsing under a unified preview filter (codename + preview license + obsolete). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Previously the manifest parse ran as `eval "$(python3 ...)"`, so a truncated/corrupt download or parse error would be swallowed and the step would continue with empty LATEST_* values. Capture the python output, check its exit status, and validate all three versions are non-empty (python also exits non-zero if any is missing). On failure, report it and set updated=false instead of silently continuing. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Problem
After #72 the Deploy container run still failed on every JDK variant — with yet another preview prompt:
Root cause
This time it wasn't the platform —
COMPILE_SDK=36.1is fine. The NDK30.0.14904198is itself a preview package (uses-license ref="android-sdk-preview-license"), sosdkmanagerstill demanded the preview license.The
<codename>filter added in #72 only catches platform previews. NDK previews carry no codename — they're marked by their license instead. We'd been chasing previews one axis at a time (37→37.0→ now the NDK), so this fixes the axis itself.Fix
Detect all three versions (platform, build-tools, NDK) from the repository manifest (
repository2-3.xml) under a single, unified preview filter — skip any package that is:obsolete="true", or<codename>element (platform previews), orandroid-sdk-preview-license(NDK/other previews).This also removes the
sdkmanager --listpath entirely — that listing was the source of the preview leakage, since previews show up there as if stable.NDK_VERSION30.0.14904198→29.0.14206865(latest stable; unblocks the release).Verification
Ran the exact workflow
runscript (as YAML hands it to bash) against the live manifest →platform=36.1 build-tools=37.0.0 ndk=29.0.14206865. Confirmed every package in the Dockerfile install command is now stable (android-sdk-license, no codename, not obsolete):platform-tools,platforms;android-36.1,build-tools;37.0.0,ndk;29.0.14206865,cmake;3.22.1.🤖 Generated with Claude Code