Skip to content

[build] Update platform-tools to 37.0.3 - #13666

Merged
jonathanpeppers merged 9 commits into
mainfrom
simonrozsival-update-platform-tools-37-0-3
Nov 20, 2026
Merged

jonathanpeppers merged 9 commits into
mainfrom
simonrozsival-update-platform-tools-37-0-3

Conversation

@simonrozsival

@simonrozsival simonrozsival commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

Context: #13646, #13644

InstallAndroidDependenciesTest fails on main because Google removed platform-tools 37.0.1 from its SDK catalog. Android CLI 1.1.16717390 returns success for platform-tools@37.0.1 but logs No url for platform-tools. Ignoring., so platform-tools is not installed.

Update platform-tools to 37.0.3, which is in the current catalog:

  • $(XAPlatformToolsVersion) and the macOS, Linux, and Windows SHA-256 hashes in Configuration.props.
  • The shipped $(AndroidSdkPlatformToolsVersion) default used by the InstallAndroidDependencies target.
  • A 37.0.3 entry in AndroidManifestFeed_d18.0.xml. Without it, WorkloadDependencies.json falls back to the newest feed revision, 37.0.1. Sizes and SHA-1 checksums come from https://dl.google.com/android/repository/repository2-3.xml.

Google can remove 37.0.3 later in the same way. #13691 changes <InstallAndroidDependencies/> to roll forward to the newest stable platform-tools in the same major version.

Validation

  • Downloaded platform-tools_r37.0.3-{darwin,linux,win}.zip from https://dl.google.com/android/repository/; all three SHA-256 hashes match Configuration.props. repository2-3.xml lists all three archives.
  • Workload dependency generation with the checked-in feed and --platform-tools-version=37.0.3 produced recommendedVersion: 37.0.3 (37.0.1 without the new feed entry).
  • dotnet build build-tools/Xamarin.Android.Tools.BootstrapTasks/Xamarin.Android.Tools.BootstrapTasks.csproj -v:minimal: passed.
  • dotnet restore src/androidsdk/androidsdk.csproj and dotnet build src/androidsdk/androidsdk.csproj --no-restore -v:minimal: passed.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 19, 2026 22:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The truncated Linux SHA-256 checksum causes SDK preparation to fail, while the unchanged 37.0.1 default leaves the clean-install dependency failure unresolved.

2 open issues
What changed in this PR

Updates .NET for Android’s SDK bootstrap configuration to platform-tools 37.0.3, motivated by the skipped-package installation failure discussed in #13646.

Changes:

  • Bumps the platform-tools version and updates archive checksums for macOS, Linux, and Windows.
  • Aligns the CLI argument-forwarding test with the 37.0.3 selector.
File Description
src/​Xamarin.Android.Build.Tasks/​Tests/​Xamarin.Android.Build.Tests/​AndroidDependenciesTests.cs Updates the supplied dependency and expected CLI argument to 37.0.3.
Configuration.props Updates the bootstrap platform-tools version and host-specific SHA-256 values.

Review effort: Balanced

Comment thread Configuration.props Resolved
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
simonrozsival and others added 3 commits November 20, 2026 07:51
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
WorkloadDependencies.json fell back to the newest feed revision (37.0.1)
because the checked-in feed lacked 37.0.3. Sizes and SHA-1 checksums come
from https://dl.google.com/android/repository/repository2-3.xml.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Android CLI catalogs replace platform-tools point releases, so an exact installer request can succeed without installing the removed package. Resolve the newest stable catalog version in the requested major band and pass that exact revision to sdk install. Never roll the default 37.x band into 38.x; fail explicitly when no compatible package is listed.

Reuse the SDK package-list parser, include installed and available packages, and preserve newer installed tools. Keep the 37.0.3 provisioning and workload feed pins, while allowing installer overrides to choose another major band. SDK archive integrity remains delegated to the Android CLI HTTPS catalog and its checksums.

Cover numeric ordering, preview rejection, major boundaries, installed packages, explicit overrides, and catalog failures. Document the roll-forward policy and diagnostics.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@simonrozsival simonrozsival changed the title [build] Update platform-tools to 37.0.3 [build] Roll platform-tools forward within supported major Nov 20, 2026
simonrozsival and others added 2 commits November 20, 2026 11:40
Select only versions listed as available in the Android CLI catalog,
and require them to be at least the requested version within the same
major version. An installed package missing from the catalog, or a
request such as 37.5 when the catalog only has 37.0.3, now fails with
XA5310 instead of silently selecting something else.

An empty platform-tools Version keeps the previous unversioned
behavior, and a malformed Version reports XA5311.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
XA5311 rejected nonnumeric versions for every Android SDK dependency,
breaking packages such as `cmdline-tools/latest` that previously
passed through unchanged. Only `platform-tools` uses its version as a
roll-forward minimum, so only validate that dependency.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@simonrozsival

Copy link
Copy Markdown
Member Author

/review

@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

✅ Android PR Reviewer completed successfully!

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • 169.254.169.254

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "169.254.169.254"

See Network Configuration for more information.

Generated by Android PR Reviewer for #13666

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Needs Changes

Findings: 0 errors, 1 warning, 0 suggestions. The inline warning identifies incomplete XA5311 validation: malformed versions with a numeric prefix are silently accepted and rewritten during catalog resolution.

The shared parser extraction preserves existing parsing behavior, and the focused tests cover numeric ordering, major-band/minimum constraints, preview exclusion, installed-package handling, and catalog failures. The shipped default, provisioning pins, workload feed entry, and new diagnostic documentation are updated consistently.

CI is not green. In Azure build 1691872, Package Tests macOS > Tests > APKs 2 failed; the latest retrieved checks also show macOS MSBuild 9 and Windows MSBuild jobs still running. Azure DevOps access requires authentication unavailable in this environment, so the failed job's cause remains unknown, not established as either a PR regression or an infrastructure failure. This was a source review; local build/test suites were not run.

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • 169.254.169.254

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "169.254.169.254"

See Network Configuration for more information.

Generated by Android PR Reviewer for #13666 · copilot · gpt61 · 55.8 AIC · ⌖ 7.26 AIC · ⊞ 20.3K
Comment /review to run again

ParseVersion accepts a numeric prefix and ignores trailing text for legacy
SDK metadata. Validate the full platform-tools request before rolling it
forward so malformed suffixes are reported instead of replaced by a catalog
version. Keep the existing permissive parser behavior for other packages.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@simonrozsival simonrozsival added the flaky-ci Intermittent CI failures and work to improve CI reliability label Nov 20, 2026
Keep this PR to the platform-tools 37.0.3 bump. The catalog-based roll-forward in InstallAndroidDependencies moves to a separate stacked PR.

This reverts f8a9f80, c87b155, 3a1385f, and 7589efb.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@jonathanpeppers jonathanpeppers changed the title [build] Roll platform-tools forward within supported major [build] Update platform-tools to 37.0.3 Nov 20, 2026
@jonathanpeppers

Copy link
Copy Markdown
Member

@dalexsoto review

@dalexsoto dalexsoto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Reviewed 2e9aee26 against main at 550ac207. This is a static, read-only review.

  • Configuration.props, Xamarin.Installer.Common.props and the test now all use 37.0.3. Each of the three SHA-256 values is a full 64-character hash for the right OS. The earlier truncated Linux hash and the 37.0.1 shipped default are both fixed.
  • The new AndroidManifestFeed_d18.0.xml entry has the same layout as the 37.0.1/37.0.0 entries. Its sizes and SHA-1 values match repository2-3.xml exactly, and 37.0.3 is the only platform-tools package that catalog lists now. Without the entry, GetElementRevision in tools/workload-dependencies would fall back to the highest revision (37.0.1), so the entry is needed.
  • The only consumers are androidsdk.targets, build-tools-inventory.proj, Xamarin.Android.Common.targets → CalculateProjectDependencies, and WorkloadDependencies.proj. No generated output is checked in. The other 37.0.1 references are parser test fixtures and the historical feed entry, so they should stay as they are.
  • I didn't download the zips. The PR's CI builds downloaded all three, and DownloadFileWithRetry only writes the .stamp file after the SHA-256 matches. InstallAndroidDependenciesTest passed once the shipped default changed.

Non-blocking: Google has replaced platform-tools zips in place before. If that happens again, the pinned SHA-256 values will fail fresh downloads, but that was already true before this PR, and #13691 covers the version roll-forward part.

@jonathanpeppers
jonathanpeppers merged commit 5d81a0f into main Nov 20, 2026
47 checks passed
@jonathanpeppers
jonathanpeppers deleted the simonrozsival-update-platform-tools-37-0-3 branch November 20, 2026 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

flaky-ci Intermittent CI failures and work to improve CI reliability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants