Migrate build system from Cake Tool to Cake.Sdk file-based apps (.NET 10)#3664
Draft
mattleibow wants to merge 5 commits intomainfrom
Draft
Migrate build system from Cake Tool to Cake.Sdk file-based apps (.NET 10)#3664mattleibow wants to merge 5 commits intomainfrom
mattleibow wants to merge 5 commits intomainfrom
Conversation
Convert 4 delegator native builds (maccatalyst, nanoserver, linuxnodeps, linux-clang-cross) and 2 xharness standalone builds (xharness-apple, xharness-android) from Cake Tool (.cake) to Cake.Sdk (.cs). Each file gets #:sdk Cake.Sdk, #:property PublishAot=false, and IncludeAdditionalFiles for shared.cs. All #load directives removed. RunCake() paths updated from .cake to .cs references. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Migrate native platform build scripts to standalone Cake.Sdk entry points: - native/android/build.cs - native/ios/build.cs - native/macos/build.cs - native/tvos/build.cs - native/linux/build.cs - native/windows/build.cs - native/wasm/build.cs - native/tizen/build.cs - native/winui/build.cs - native/winui-angle/build.cs Each file uses #:sdk Cake.Sdk directive with IncludeAdditionalFiles for shared helpers, #:package for required addins, and PublishAot=false. Original .cake files are preserved alongside the new .cs files. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
….cs) Convert the main build file and all 9 shared helper files from .cake (Cake Tool) format to .cs (Cake.Sdk) format: - build.cs: Main entry point with top-level statements, #:sdk and #:package directives, InstallTool() calls replacing #tool directives - scripts/cake/shared.cs: Shared variables and helpers wrapped in partial class Program with internal static members - scripts/cake/native-shared.cs: Native build helpers with Task registration in Main_NativeShared() - scripts/cake/msbuild.cs: MSBuild/DotNet build helpers - scripts/cake/UtilsManaged.cs: Test runners and managed utilities - scripts/cake/externals.cs: External dependency tasks in Main_Externals(), build.cs references changed to .cs - scripts/cake/samples.cs: Sample build tasks in Main_Samples() - scripts/cake/UpdateDocs.cs: Documentation generation tasks in Main_UpdateDocs() - scripts/cake/xcode.cs: Xcode build helpers (removed #addin) - scripts/cake/ndk.cs: Android NDK helpers Key structural changes: - Only build.cs has top-level statements - All other files use public static partial class Program - Task registrations wrapped in private static void Main_*() methods - Top-level variables become internal static fields - RunCake() updated to use 'dotnet run --file' instead of DotNetTool - NuGet.Packaging version bumped from 6.9.1 to 6.14.0 - Old .cake files preserved (cleanup is a separate phase) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- global.json: Pin Cake.Sdk 6.1.1 via msbuild-sdks - nuget.config: Add nuget.org source for Cake.Sdk resolution - dotnet-tools.json: Remove cake.tool (replaced by Cake.Sdk) - build.ps1/sh: Use dotnet run --file build.cs instead of dotnet cake - PlatformTestBase.cs: Look for build.cs in addition to build.cake Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
📦 Try the packages from this PRWarning 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 -- 3664PowerShell / Windows: iex "& { $(irm https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.ps1) } 3664"Step 2 — Add the local NuGet source dotnet nuget add source ~/.skiasharp/hives/pr-3664/packages --name skiasharp-pr-3664More options
Or download manually from Azure Pipelines — look for the Remove the source when you're done: dotnet nuget remove source skiasharp-pr-3664 |
…ld.cs' Update CI bootstrapper YAML, GitHub Actions workflows, Docker scripts, documentation, skills, devcontainer, and CONTRIBUTING.md to use the new Cake.Sdk invocation instead of the removed cake.tool. 34 files updated across: - scripts/azure-templates-jobs-bootstrapper.yml (the main CI failure) - .github/workflows/samples.yml - scripts/Docker/_clang-cross-common.sh - scripts/Docker/wasm/build-local.sh and .ps1 - .devcontainer/devcontainer.json - CONTRIBUTING.md - .github/copilot-instructions.md - documentation/dev/*.md (7 files) - .github/skills/*/SKILL.md and references (14 files) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrates SkiaSharp's entire build system from Cake Tool 4.0.0 (
.cakescripting withdotnet cake) to Cake.Sdk 6.1.1 (.NET 10 file-based apps withdotnet run --file build.cs).Build infrastructure modernization — no functional changes to what the build produces.
What changed
.csbuild files created alongside existing.cakefiles#addin→#:package,#tool→InstallTool(),#load→IncludeAdditionalFilespartial class Program+Main_*entry pointsCake.Sdk 6.1.1via msbuild-sdkscake.tooldotnet run --file build.csreplacesdotnet cakeNotes
.cakefiles preserved for safe rollback — delete after validation