Skip to content

Skip preview NDK; detect all SDK versions from manifest under one preview filter - #73

Merged
compscidr merged 2 commits into
mainfrom
fix/skip-preview-ndk
May 20, 2026
Merged

compscidr merged 2 commits into
mainfrom
fix/skip-preview-ndk

Conversation

@compscidr

Copy link
Copy Markdown
Owner

Problem

After #72 the Deploy container run still failed on every JDK variant — with yet another preview prompt:

Accept? (y/N): License android-sdk-preview-license:
To get started with the Android SDK Preview, you must agree to the following terms and conditions...
ERROR: ... sdkmanager ... did not complete successfully: exit code: 1

Root cause

This time it wasn't the platform — COMPILE_SDK=36.1 is fine. The NDK 30.0.14904198 is itself a preview package (uses-license ref="android-sdk-preview-license"), so sdkmanager still 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 (3737.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
  • carries a <codename> element (platform previews), or
  • uses android-sdk-preview-license (NDK/other previews).

This also removes the sdkmanager --list path entirely — that listing was the source of the preview leakage, since previews show up there as if stable.

  • Dockerfile: NDK_VERSION 30.0.1490419829.0.14206865 (latest stable; unblocks the release).
  • check-sdk-updates.yml: single manifest-based detection for platform, build-tools, and NDK.

Verification

Ran the exact workflow run script (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

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>
Copilot AI review requested due to automatic review settings May 20, 2026 20:19

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_VERSION in the Dockerfile from preview 30.0.14904198 to stable 29.0.14206865.
  • Replace sdkmanager --list-based detection in check-sdk-updates.yml with manifest (repository2-3.xml) parsing for platform/build-tools/NDK, filtering out obsolete, <codename> (platform previews), and android-sdk-preview-license packages.

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.

Comment thread .github/workflows/check-sdk-updates.yml
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>
@compscidr
compscidr merged commit 80c49f3 into main May 20, 2026
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