Cake v3.0.0 released

Highlights of this release

  • .NET 7 Support & C#11 Support
  • TaskOf<T>
  • Multiple target support
  • Improved build providers
  • Addin recommended Cake version set to 3.0.0

Breaking changes

.NET 7 Support & C# 11 Support

TaskOf<T>

public record BuildData(bool Initialized);Setup(ctx => new BuildData(true));TaskOf<BuildData>("TaskOfT")
.Description("Very typed task")
.WithCriteria((context, data) => data.Initialized)
.Does((context, data) => context.Information("Initialized: {0}.", data.Initialized))
.Does(async (context, data) => await /* async work*/)
.DoesForEach(
(data, context) => new [] { data.Initialized },
(data, item, context) => context.Information("Item: {0}, Initialized: {1}.", item, data.Initialized)
)
.DoesForEach(
new [] { true, false },
(data, item, context) => context.Information("Item: {0}, Initialized: {1}.", item, data.Initialized)
);
RunTarget("TaskOfT");

Multiple target support

Task("A")
.Does(() => { /* do stuff */ });
Task("B")
.IsDependentOn("C")
.Does(() => { /* do stuff */ });
Task("C")
.Does(() => { /* do stuff */ });
Task("Default");RunTargets(Arguments<string>("target", new []{ "Default" }));
========================================
A
========================================
========================================
C
========================================
========================================
B
========================================
Task Duration
--------------------------------------------------
A 00:00:00.0028166
C 00:00:00.0006761
B 00:00:00.0006161
--------------------------------------------------
Total: 00:00:00.0041088

Improved build providers

  • SetStepSummary Command
  • SetOutputParameter Command
  • Workflow commands
  • Build status message
  • Statistics
  • SetEnvironmentVariable Command
  • CI runner tags improvements

Addin recommended Cake version set to 3.0.0

The assembly 'Cake.Twitter, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null' 
is referencing an older version of Cake.Core (2.0.0).
For best compatibility it should target Cake.Core version 3.0.0.

Contributors

Issues

  • #4046 Add typed data context CakeTaskBuilder.Finally overload.
  • #4000 Remove obsolete CakeEngine Setup/Teardown events.
  • #3997 Remove obsolete Logger property from DotNetTestSettings.
  • #3991 Remove Obsolete DotNetCore aliases.
  • #3972 Remove .NET Core 3.1 TFM.
  • #3969 Update Spectre.Console to 0.45.0.
  • #3949 Remove .NET 5 TFM.
  • #3946 Access to ITaskSetupContext in Frosting.
  • #3867 Rename WindowsFact to WindowsFactAttribute to follow best practices.
  • #3722 DotNetCore -> DotNet Rename Missed Objects.
  • #4047 Add typed CakeTaskBuilder / TaskOf() to easier work with typed data context.
  • #4028 Add GitLab CI SetEnvironmentVariable Command.
  • #4019 Add support for TeamCity build status message.
  • #4018 Add Support For TeamCity Statistics.
  • #4011 Add GitHub Actions SetStepSummary Command.
  • #4009 Add GitHub Actions SetOutputParameter Command.
  • #3950 Add .NET 7 Support.
  • #3328 Frosting: Support criteria description.
  • #2863 Add support for GitHub Action workflow commands.
  • #2470 Call multiple tasks from CLI and pass them to RunTarget.
  • #1146 Add OutputDirectory property for Chocolatey Aliases.
  • #4060 Update Microsoft.NETCore.Platforms to 7.0.0.
  • #4059 Update System.Reflection.Metadata to 7.0.0.
  • #4058 Update System.Collections.Immutable to 7.0.0.
  • #4057 Update Microsoft.Extensions.DependencyInjection to 7.0.0.
  • #4055 Add column to summary to include skip reason.
  • #4052 Update Basic.Reference.Assemblies.* to 1.4.1.
  • #4050 Overhaul Chocolatey Cake aliases.
  • #4044 Overload missing for IsDependeeOf accepting a CakeTaskBuilder object.
  • #4038 Add missing MSBuildSettings to DotNetRunSettings.
  • #4036 Add missing MSBuildSettings to DotNetTestSettings.
  • #4032 Add additional settings for ILMerge.
  • #4020 Update Basic.Reference.Assemblies.* to 1.4.0.
  • #4016 Update Microsoft.CodeAnalysis.CSharp.Scripting to 4.4.0–4.final.
  • #4006 Add missing GitVersion command line options.
  • #3124 EscapedBranchName is not supported by GitVersion.CommandLine.
  • #4023 Update supported versions of Cake.
  • #4034 DotNetMSBuildSettings ArgumentCustomization is not called with all DotNet* aliases.
  • #4030 GitLab CI runner tags are not split correctly.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Cake Build

Cake Build

Cake (C# Make) is a build automation system