Skip to content

Upgrade SkiaSharp major version from 3.x to 4.x#3640

Open
mattleibow wants to merge 5 commits intomainfrom
dev/upgrade-skiasharp-v4
Open

Upgrade SkiaSharp major version from 3.x to 4.x#3640
mattleibow wants to merge 5 commits intomainfrom
dev/upgrade-skiasharp-v4

Conversation

@mattleibow
Copy link
Copy Markdown
Contributor

Summary

Bumps SkiaSharp's major version from 3.119.x to 4.119.x and makes version references more maintainable for future bumps.

Version bump (3 → 4)

  • scripts/VERSIONS.txt — Assembly 4.119.0.0, file 4.119.4.0, all 30 NuGet packages → 4.119.4
  • scripts/azure-templates-variables.ymlSKIASHARP_MAJOR_VERSION: 4, SKIASHARP_VERSION: 4.119.4
  • build.cakeSkiaSharp.Views.Gtk4 minimum version → (4, 119, 0)
  • Skill docs — All example versions updated from 3.119.x to 4.119.x

Future-proofing (reduce work for next major bump)

  • samples/_UnoPlatformSamples.targets — Now reads SkiaSharp/HarfBuzzSharp versions dynamically from VERSIONS.txt at build time instead of hardcoding them (eliminates 14 hardcoded refs)
  • update-versions.ps1 — Uses dynamic major version detection instead of hardcoded 3.
  • building-samples.md — Uses SkiaSharp.[0-9]* glob pattern instead of SkiaSharp.3*, and X.Y.Z placeholders in examples
  • Documentation & comments — Converted to version-agnostic X.Y.Z placeholders where possible

For the next major bump (4→5), only 2 files need updating:

  1. scripts/VERSIONS.txt (source of truth)
  2. scripts/azure-templates-variables.yml (CI counter requires compile-time value)

Verified

  • dotnet cake --target=externals-download succeeded
  • dotnet build binding/SkiaSharp/SkiaSharp.csproj — 0 errors, assembly version = 4.119.0.0
  • dotnet pack — produces SkiaSharp.4.119.4.nupkg
  • ✅ No stale 3.119 references remain (changelogs excluded as historical records)

mattleibow and others added 3 commits April 2, 2026 20:51
Update all example/documentation version references in skill SKILL.md
and reference files to reflect the new 4.x major version. Historical
version references (3.116.x, 2.88.x) used as comparison baselines
are preserved.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Update VERSIONS.txt: assembly 4.119.0.0, file 4.119.4.0, all nuget 4.119.4
- Update azure-templates-variables.yml: SKIASHARP_MAJOR_VERSION=4, SKIASHARP_VERSION=4.119.4
- Update samples/_UnoPlatformSamples.targets: package versions to 4.119.0
- Update build.cake: SkiaSharp.Views.Gtk4 minimum version to 4.119.0
- Fix update-versions.ps1: use dynamic major version detection instead of hardcoded '3'
- Fix building-samples.md: use SkiaSharp.[0-9]* glob pattern instead of SkiaSharp.3*
- Update all doc examples from 3.119.x to 4.119.x

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- _UnoPlatformSamples.targets: read SkiaSharp/HarfBuzzSharp versions
  from scripts/VERSIONS.txt at build time instead of hardcoding them
  (eliminates 14 hardcoded version references)
- azure-templates-variables.yml: add comment explaining these must be
  kept in sync with VERSIONS.txt (can't be dynamic due to CI counter)
- building-samples.md: use X.Y.Z placeholders instead of specific
  version numbers in examples
- adding-libraries.md: use X.Y.Z placeholder in example
- detect-preview-version.ps1: use generic version in comment
- integration test csproj: use generic version in comment

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 2, 2026

📦 Try the packages from this PR

Warning

Do not run these scripts without first reviewing the code in this PR.

Step 1 — Download the packages

bash / macOS / Linux:

curl -fsSL https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.sh | bash -s -- 3640

PowerShell / Windows:

iex "& { $(irm https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.ps1) } 3640"

Step 2 — Add the local NuGet source

dotnet nuget add source ~/.skiasharp/hives/pr-3640/packages --name skiasharp-pr-3640
More options
Option Description
--successful-only / -SuccessfulOnly Only use successful builds
--force / -Force Overwrite previously downloaded packages
--list / -List List available artifacts without downloading
--build-id ID / -BuildId ID Download from a specific build

Or download manually from Azure Pipelines — look for the nuget artifact on the build for this PR.

Remove the source when you're done:

dotnet nuget remove source skiasharp-pr-3640

mattleibow and others added 2 commits April 3, 2026 00:37
Only keep functional changes — version examples in skill docs and
documentation don't need to match the actual current version.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
_UnoPlatformSamples.targets uses old versions intentionally for testing.
build.cake SUPPORTED_NUGETS tracks the minimum version a package first
existed — not the current version.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant