Repository navigation
[build] Update platform-tools to 37.0.3 - #13666
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 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
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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>
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>
|
/review |
|
✅ Android PR Reviewer completed successfully! Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "169.254.169.254"See Network Configuration for more information.
|
There was a problem hiding this comment.
⚠️ 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>
|
@dalexsoto review |
dalexsoto
left a comment
There was a problem hiding this comment.
Reviewed 2e9aee26 against main at 550ac207. This is a static, read-only review.
Configuration.props,Xamarin.Installer.Common.propsand 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.xmlentry has the same layout as the 37.0.1/37.0.0 entries. Its sizes and SHA-1 values matchrepository2-3.xmlexactly, and 37.0.3 is the only platform-tools package that catalog lists now. Without the entry,GetElementRevisionintools/workload-dependencieswould 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, andWorkloadDependencies.proj. No generated output is checked in. The other37.0.1references 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
DownloadFileWithRetryonly writes the.stampfile after the SHA-256 matches.InstallAndroidDependenciesTestpassed 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.

Context: #13646, #13644
InstallAndroidDependenciesTestfails onmainbecause Google removed platform-tools 37.0.1 from its SDK catalog. Android CLI 1.1.16717390 returns success forplatform-tools@37.0.1but logsNo 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 inConfiguration.props.$(AndroidSdkPlatformToolsVersion)default used by theInstallAndroidDependenciestarget.AndroidManifestFeed_d18.0.xml. Without it,WorkloadDependencies.jsonfalls 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
platform-tools_r37.0.3-{darwin,linux,win}.zipfromhttps://dl.google.com/android/repository/; all three SHA-256 hashes matchConfiguration.props.repository2-3.xmllists all three archives.--platform-tools-version=37.0.3producedrecommendedVersion: 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.csprojanddotnet build src/androidsdk/androidsdk.csproj --no-restore -v:minimal: passed.