Skip to content

[build] Use command-line tools 21.0 by default - #12896

Merged
jonathanpeppers merged 2 commits into
mainfrom
jonathanpeppers-downgrade-cmdline-tools-21
Sep 23, 2026
Merged

jonathanpeppers merged 2 commits into
mainfrom
jonathanpeppers-downgrade-cmdline-tools-21

Conversation

@jonathanpeppers

@jonathanpeppers jonathanpeppers commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

Description

Downgrade the recommended Android command-line tools version from 22.0 to 21.0.

Command-line tools 21.0 is the newest release where sdkmanager is not deprecated. Version 22.0 emits a deprecation warning, while 23.0 redirects users to the Android CLI. Keeping 21.0 as the installer default preserves the supported sdkmanager workflow.

The Xamarin manifest now removes 22.0 and marks 21.0 as its cmdline-tools/latest package, keeping the installer recommendation and installation path coordinated. The existing Google archive URLs for 21.0 are unchanged.

Testing

  • Built src/Xamarin.Installer.AndroidSDK/Xamarin.Installer.AndroidSDK.csproj
  • Confirmed the generated RequiredCommandLineToolsVersion constant is 21.0
  • Confirmed the manifest contains no 22.0 entry and exactly one cmdline-tools/latest entry for 21.0

Command-line tools 22.0 deprecates sdkmanager, while 21.0 is the newest release that keeps it supported. Keep 21.0 as the installer recommendation so license and SDK management continue to use the supported sdkmanager flow.

Co-authored-by: Copilot App <[email protected]>
Copilot AI lite review requested due to automatic review settings September 23, 2026 12:51

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.

Copilot review overview

🟢 Approval recommended

The reviewed change is supported and preserves the supported sdkmanager workflow.

Review effort: Lite
Findings: None

What changed in this PR

Updates the default Android command-line tools version from 22.0 to 21.0 to preserve the supported sdkmanager workflow.

Changes:

  • Sets the shared default version to 21.0.
  • Keeps generated installer constants aligned with the supported feed entry.
File Description
src/​Xamarin.Installer.Build.Tasks/​Xamarin.Installer.Common.props Sets the default command-line tools version to 21.0.

@jonathanpeppers jonathanpeppers added this to the .NET 11 milestone Sep 23, 2026
Remove command-line tools 22.0 from the Xamarin manifest and install 21.0 into cmdline-tools/latest so the feed matches the recommended installer version.

Co-authored-by: Copilot App <[email protected]>
@jonathanpeppers

Copy link
Copy Markdown
Member Author

@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.

The new 21.0 installer default cannot be fulfilled by the default feed. Xamarin.Installer.Common.props now requires 21.0, but XamarinRepository.GetDefaultManifestURL() reads https://aka.ms/AndroidManifestFeed/d18-0 rather than the updated checked-in XML; that live feed currently has 19.0 as latest and no cmdline-tools;21.0. InstallAndroidDependencies therefore treats 21.0 as unknown, only emits a warning, and returns success without installing the requested command-line tools (see XamarinRepository.cs:43-47, Repository.cs:240-250, and InstallAndroidDependencies.cs:181-202,269-284). Please ensure 21.0 is available from the default feed before switching the required version, or have the installer consume the updated bundled feed; test a default-source install without overriding AndroidManifestSource.

@jonathanpeppers

Copy link
Copy Markdown
Member Author

We normally update the https://aka.ms/AndroidManifestFeed/d18-0 URL after merging.

@jonathanpeppers

Copy link
Copy Markdown
Member Author

@dalexsoto stamp

@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.

Stamping as requested by @jonathanpeppers; no code review performed.

@jonathanpeppers
jonathanpeppers merged commit 2e54903 into main Sep 23, 2026
42 of 44 checks passed
@jonathanpeppers
jonathanpeppers deleted the jonathanpeppers-downgrade-cmdline-tools-21 branch September 23, 2026 20:54
@jonathanpeppers

Copy link
Copy Markdown
Member Author

/backport to release/11.0.1xx-rc2

@github-actions

Copy link
Copy Markdown
Contributor

Started backporting to release/11.0.1xx-rc2 (link to workflow run)

jonathanpeppers added a commit that referenced this pull request Sep 24, 2026
Downgrade the recommended Android command-line tools version from 22.0 to 21.0.

Command-line tools 21.0 is the newest release where `sdkmanager` is not deprecated. Version 22.0 emits a deprecation warning, while 23.0 redirects users to the Android CLI. Keeping 21.0 as the installer default preserves the supported `sdkmanager` workflow.

The Xamarin manifest now removes 22.0 and marks 21.0 as its `cmdline-tools/latest` package, keeping the installer recommendation and installation path coordinated. The existing Google archive URLs for 21.0 are unchanged.

Co-authored-by: Jonathan Peppers <[email protected]>
Co-authored-by: Copilot App <[email protected]>
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.

4 participants