This is a C# Cake build project for building, testing and packaging the ably-dotnet SDK.
Migrated from FAKE (F#) to Cake (C#) to:
- Make build system accessible to all C# developers
- Improve maintainability with better IDE support and debugging
- Leverage larger community and better documentation
- .NET SDK 6.0+ (for building)
- Cake.Tool (installed via
dotnet tool restore) - NuGet CLI (for package creation)
Clone the project and download Cake tools by running the following command at root:
dotnet tool restoreRunning .\build.cmd (Windows) or ./build.sh (Unix/macOS) will start the build process. By default it builds the NetStandard project.
We have a dedicated NetFramework project targeting .NET Framework 4.6+.
Windows:
.\build.cmd --target=Build.NetFrameworkNetStandard currently supports explicit targets for netstandard2.0, net6.0 and net7.0.
Windows:
.\build.cmd --target=Build.NetStandardUnix/macOS:
./build.sh --target=Build.NetStandardWe have a Xamarin solution targeting Android and iOS.
Unix/macOS:
./build.sh --target=Build.XamarinRun unit tests:
.\build.cmd --target=Test.NetFramework.Unit
.\build.cmd --target=Test.NetFramework.Unit.WithRetry # Retry failed testsRun integration tests:
.\build.cmd --target=Test.NetFramework.Integration
.\build.cmd --target=Test.NetFramework.Integration.WithRetry # Retry failed testsRun unit tests:
./build.sh --target=Test.NetStandard.Unit
./build.sh --target=Test.NetStandard.Unit.WithRetry # Retry failed testsRun integration tests:
./build.sh --target=Test.NetStandard.Integration
./build.sh --target=Test.NetStandard.Integration.WithRetry # Retry failed testsTarget specific framework:
Additional --framework flag can be supplied to test for target framework net6.0 or net7.0:
./build.sh --target=Test.NetStandard.Unit --framework=net6.0 # Run tests for .NET 6.0 runtime
./build.sh --target=Test.NetStandard.Unit --framework=net7.0 # Run tests for .NET 7.0 runtimeCurrently, we have two scripts to generate NuGet packages:
- Responsible for creating core
ably.ioNuGet package. - Works only on Windows due to a dependency on the .NET Framework.
.\package.cmd 1.2.3Above command creates ably.io.1.2.3.nupkg package at root.
During release process, this package is hosted on nuget.org/packages/ably.io.
Responsible for creating push packages for Android and iOS.
Please take a look at Push Notification Documentation for usage.
Unix/macOS:
./package-push.sh 1.2.3Windows:
.\package-push.cmd 1.2.3Above command creates ably.io.push.android.1.2.3.nupkg and ably.io.push.ios.1.2.3.nupkg packages at root.
During release process, these packages are hosted on:
.\build.cmd --target=Build.NetStandard --configuration=Debug.\build.cmd --target=Build.NetStandard --define=MY_CONSTANT.\build.cmd --target=Build.NetStandard --verbosity=diagnostic.\build.cmd --descriptionNote: This command shows all tasks including internal tasks (starting with _). Internal tasks are implementation details and should not be called directly. Use the public targets listed in this README instead.
.\build.cmd --tree.\build.cmd --target=Build.NetStandard --dryrun