Skip to content

[build] Mark AndroidSdk package as prerelease - #12604

Merged
jonathanpeppers merged 3 commits into
mainfrom
jonathanpeppers-preview-androidsdk-version
Sep 1, 2026
Merged

[build] Mark AndroidSdk package as prerelease#12604
jonathanpeppers merged 3 commits into
mainfrom
jonathanpeppers-preview-androidsdk-version

Conversation

@jonathanpeppers

@jonathanpeppersjonathanpeppers commented Aug 31, 2026

Copy link
Copy Markdown
Member

Pull Request
title and
description
should follow the
commit-messages.md workflow documentation, and in particular should include:

  • Useful description of why the change is necessary.
  • Links to issues fixed
  • Unit tests: N/A

The Build Promotion Pipeline failure rejects Xamarin.Android.Tools.AndroidSdk because its stable-looking package version is targeted at the non-isolated .NET 11 transport feed:

Package 'Xamarin.Android.Tools.AndroidSdk' has stable version '37.0.2353' but is targeted at a non-isolated feed 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet11-transport/nuget/v3/index.json'

Give only the AndroidSdk package a preview suffix. The failing full-history build's 37.0.2353 therefore becomes 37.0.0-preview.2353. The shared versioning target retains its existing default, so Microsoft.Android.Build.BaseTasks keeps its current versioning behavior.

The prerelease suffix applies only to PackageVersion; the numeric assembly Version remains distance-based. Consecutive full-history builds therefore remain distinct to .NET Framework as assembly versions such as 37.0.2361.0 and 37.0.2362.0, while NuGet sees package versions 37.0.0-preview.2361 and 37.0.0-preview.2362.

PR validation uses a shallow checkout, where the existing versioning fallback intentionally produces distance 0. The downloaded PR artifact is therefore 37.0.0-preview.0; release builds retain the real commit distance.

Use an AndroidSdk-only preview suffix for its NuGet package version so promotion can publish it to the non-isolated transport feed. Keep Microsoft.Android.Build.BaseTasks on its existing stable-style version.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 325ffe1d-b572-4873-88d1-f359670fcb20
CopilotAI lite review requested due to automatic review settings August 31, 2026 16:59

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

🟢 Approval recommended

Pull request overview

This PR adjusts NuGet versioning for the in-tree Xamarin.Android.Tools.AndroidSdk package so it is published as a prerelease (e.g., 37.0.0-preview.<commitCount>), while leaving the shared tools versioning behavior unchanged for other packages that import the same versioning targets.

Changes:

  • Set a project-local _AndroidToolsPackageVersionSuffix to preview for Xamarin.Android.Tools.AndroidSdk.
  • Update Xamarin.Android.Tools.Versioning.targets to emit a prerelease PackageVersion when that suffix is provided.
File summaries
FileDescription
src/Xamarin.Android.Tools.AndroidSdk/Xamarin.Android.Tools.AndroidSdk.csprojSets a private version-suffix property so only this package gets a prerelease NuGet version.
build-tools/scripts/Xamarin.Android.Tools.Versioning.targetsAdds conditional PackageVersion computation to incorporate the optional prerelease suffix.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Lite

Fetch complete history in the macOS and Windows package-building jobs so AndroidSdk can calculate its commit-distance package and assembly versions instead of using the shallow-checkout fallback of zero.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 325ffe1d-b572-4873-88d1-f359670fcb20
@jonathanpeppersjonathanpeppers added the ready-to-review This PR is ready to review/merge, I think any CI failures are just flaky (ignorable). label Aug 31, 2026
@jonathanpeppers

Copy link
Copy Markdown
MemberAuthor

Ok this is ready, I went back and forth with copilot as the version was wrong on the PR build.

But I think it will be correct when merged.

@jonathanpeppers
jonathanpeppers merged commit e534500 into mainSep 1, 2026
41 of 44 checks passed
@jonathanpeppers
jonathanpeppers deleted the jonathanpeppers-preview-androidsdk-version branch September 1, 2026 00:33
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-reviewThis PR is ready to review/merge, I think any CI failures are just flaky (ignorable).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@jonathanpeppers@simonrozsival