Skip to content

Remove Legacy Xamarin & NUKE overhaul #700

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Dec 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,8 @@ src/**/build/
# End of https://www.toptal.com/developers/gitignore/api/android,java,gradle

# Silk.NET Build System
build/sln
*.gen.sln
*.gen.txt

# Silk.NET Website Generation Output
docs/
Expand Down
20 changes: 17 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,18 +72,18 @@ In addition, the Silk.NET working group help drive larger user-facing changes pr
Prerequisites
- **Must**: .NET 6 SDK
- **Should**: Android (w/ AOT), iOS, and MAUI .NET 6 workloads (use `dotnet workload install android android-aot ios maui` to install them)
- **Should**: Android SDK version 30 with NDK tools installed
- **Should**: Android SDK version 30 with NDK tools installed. On Windows, for best results this should be installed into `C:\ProgramData\Android\android-sdk`.
- **Could**: Java JDK (for gradle)
- **Could**: Visual Studio 2019 Community version 16.10 or later

Instructions
- Clone the repository (recursively)
- Run build.sh, build.cmd, build.ps1, or `nuke compile`. By default all packages targeting .NET Core, Standard, or .NET 6 are built. To build our older Xamarin iOS and Android packages, add the `--feature-sets legacy-ios legacy-android` arguments.
- Run build.sh, build.cmd, build.ps1, or `nuke compile`.
- Use the DLLs. To get nupkgs you can use with NuGet instead, use `nuke pack`.

There are more advanced build actions you can do too, such as FullBuild, Pack, FullPack, among others which you can view by doing `nuke --plan`.

The older Xamarin projects will not build properly without being configured to use Desktop MSBuild (i.e. the MSBuild shipped with Visual Studio). As a result, you will ideally need to be on Windows and have Visual Studio 2019 Community (v16.10 or greater) installed with .NET Core and Xamarin workloads. If you don't have this (i.e. because you're on Linux or Mac), you won't be able to build the older Xamarin packages.
Note: Some .NET 6 workloads are only supported on Windows and macOS today.

<h1 align="center">Contributing</h1>

Expand All @@ -95,6 +95,20 @@ Silk.NET uses and encourages [Early Pull Requests](https://medium.com/practical-
4. Make your commits in small, incremental steps with clear descriptions.
5. Tag a maintainer when you're done and ask for a review!

The Silk.NET solution is **very large**. As such, to generate a solution that only has the projects you care about for your contribution, use the following command:
`nuke sln --projects project1 project2...`. `<projects>` can be substitued for:
- A name of an individual project. The Silk.NET prefix can be omitted provided there is no matching subfolder.
- A name of a subfolder in the repo root, `src/`, or `examples/CSharp`

Example: `nuke sln --projects opengl silk.net.vulkan core.win32extras "opengl tutorials" build`. This:
- matches `opengl` to `src/OpenGL`
- matches `silk.net.vulkan` to `src/Vulkan/Silk.NET.Vulkan`
- matches `core.win32extras` to `src/Core/Silk.NET.Core.Win32Extras`
- matches `"opengl tutorials"` to `examples/CSharp/OpenGL Tutorials`
- matches `build` to `build/`

The generated solution is: `Silk.NET.gen.sln`

<!-- End exclude from NuGet readme. -->

<h2 align="center">Funding</h2>
Expand Down
81 changes: 0 additions & 81 deletions Silk.NET.sln
Original file line number Diff line number Diff line change
Expand Up @@ -259,14 +259,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Silk.NET.Windowing.Sdl", "s
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Silk.NET.Input.Sdl", "src\Input\Silk.NET.Input.Sdl\Silk.NET.Input.Sdl.csproj", "{377A7D9A-2691-4683-AB81-03B1642B3A78}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Android", "Android", "{61EA5E26-EC46-432B-817F-B39122085586}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Silk.NET.Windowing.Sdl.Android", "src\Windowing\Android\Silk.NET.Windowing.Sdl.Android\Silk.NET.Windowing.Sdl.Android.csproj", "{20E576FC-D978-4CA3-9A4D-775C6432C213}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Silk.NET.Windowing.Sdl.iOS", "src\Windowing\iOS\Silk.NET.Windowing.Sdl.iOS\Silk.NET.Windowing.Sdl.iOS.csproj", "{603F28D1-E982-47C0-98D9-3E6DA1DD37E2}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "iOS", "iOS", "{488775D1-32CC-46D7-8DD7-BB331EC659B9}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Silk.NET.NUKE", "build\nuke\Silk.NET.NUKE.csproj", "{B9A8D738-FE7D-4860-A446-4A03E3DDEB74}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft", "Microsoft", "{F2CF5D32-4B41-425E-B229-8FFC48F88063}"
Expand Down Expand Up @@ -339,12 +331,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestLib", "src\Lab\Experime
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Triangle", "src\Lab\Experiments\Triangle\Triangle.csproj", "{6E61C442-66B0-429E-BE5D-4ACD0045F0A5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TriangleDroid", "src\Lab\Experiments\TriangleDroid\TriangleDroid.csproj", "{7715CA80-4305-456B-9F66-2CED43E30AEF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TriangleDroidUvExperiment", "src\Lab\Experiments\TriangleDroidUvExperiment\TriangleDroidUvExperiment.csproj", "{CE0516F7-78D2-474F-A4A1-6ED97EB7CD9D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TriangleIOS", "src\Lab\Experiments\TriangleIOS\TriangleIOS.csproj", "{8669819B-654F-4E41-9030-1CCA56D64E88}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Utf8Test", "src\Lab\Experiments\Utf8Test\Utf8Test.csproj", "{70B06D00-CEA9-47CD-8781-10CA48376046}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VeldridTriangle", "src\Lab\Experiments\VeldridTriangle\VeldridTriangle.csproj", "{28760ABB-EB0F-4216-97B0-0DAC5FC27533}"
Expand Down Expand Up @@ -1764,30 +1750,6 @@ Global
{377A7D9A-2691-4683-AB81-03B1642B3A78}.Release|x64.Build.0 = Release|Any CPU
{377A7D9A-2691-4683-AB81-03B1642B3A78}.Release|x86.ActiveCfg = Release|Any CPU
{377A7D9A-2691-4683-AB81-03B1642B3A78}.Release|x86.Build.0 = Release|Any CPU
{20E576FC-D978-4CA3-9A4D-775C6432C213}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{20E576FC-D978-4CA3-9A4D-775C6432C213}.Debug|Any CPU.Build.0 = Debug|Any CPU
{20E576FC-D978-4CA3-9A4D-775C6432C213}.Debug|x64.ActiveCfg = Debug|Any CPU
{20E576FC-D978-4CA3-9A4D-775C6432C213}.Debug|x64.Build.0 = Debug|Any CPU
{20E576FC-D978-4CA3-9A4D-775C6432C213}.Debug|x86.ActiveCfg = Debug|Any CPU
{20E576FC-D978-4CA3-9A4D-775C6432C213}.Debug|x86.Build.0 = Debug|Any CPU
{20E576FC-D978-4CA3-9A4D-775C6432C213}.Release|Any CPU.ActiveCfg = Release|Any CPU
{20E576FC-D978-4CA3-9A4D-775C6432C213}.Release|Any CPU.Build.0 = Release|Any CPU
{20E576FC-D978-4CA3-9A4D-775C6432C213}.Release|x64.ActiveCfg = Release|Any CPU
{20E576FC-D978-4CA3-9A4D-775C6432C213}.Release|x64.Build.0 = Release|Any CPU
{20E576FC-D978-4CA3-9A4D-775C6432C213}.Release|x86.ActiveCfg = Release|Any CPU
{20E576FC-D978-4CA3-9A4D-775C6432C213}.Release|x86.Build.0 = Release|Any CPU
{603F28D1-E982-47C0-98D9-3E6DA1DD37E2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{603F28D1-E982-47C0-98D9-3E6DA1DD37E2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{603F28D1-E982-47C0-98D9-3E6DA1DD37E2}.Debug|x64.ActiveCfg = Debug|Any CPU
{603F28D1-E982-47C0-98D9-3E6DA1DD37E2}.Debug|x64.Build.0 = Debug|Any CPU
{603F28D1-E982-47C0-98D9-3E6DA1DD37E2}.Debug|x86.ActiveCfg = Debug|Any CPU
{603F28D1-E982-47C0-98D9-3E6DA1DD37E2}.Debug|x86.Build.0 = Debug|Any CPU
{603F28D1-E982-47C0-98D9-3E6DA1DD37E2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{603F28D1-E982-47C0-98D9-3E6DA1DD37E2}.Release|Any CPU.Build.0 = Release|Any CPU
{603F28D1-E982-47C0-98D9-3E6DA1DD37E2}.Release|x64.ActiveCfg = Release|Any CPU
{603F28D1-E982-47C0-98D9-3E6DA1DD37E2}.Release|x64.Build.0 = Release|Any CPU
{603F28D1-E982-47C0-98D9-3E6DA1DD37E2}.Release|x86.ActiveCfg = Release|Any CPU
{603F28D1-E982-47C0-98D9-3E6DA1DD37E2}.Release|x86.Build.0 = Release|Any CPU
{B9A8D738-FE7D-4860-A446-4A03E3DDEB74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B9A8D738-FE7D-4860-A446-4A03E3DDEB74}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B9A8D738-FE7D-4860-A446-4A03E3DDEB74}.Debug|x64.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -2135,42 +2097,6 @@ Global
{6E61C442-66B0-429E-BE5D-4ACD0045F0A5}.Release|x64.Build.0 = Release|Any CPU
{6E61C442-66B0-429E-BE5D-4ACD0045F0A5}.Release|x86.ActiveCfg = Release|Any CPU
{6E61C442-66B0-429E-BE5D-4ACD0045F0A5}.Release|x86.Build.0 = Release|Any CPU
{7715CA80-4305-456B-9F66-2CED43E30AEF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7715CA80-4305-456B-9F66-2CED43E30AEF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7715CA80-4305-456B-9F66-2CED43E30AEF}.Debug|x64.ActiveCfg = Debug|Any CPU
{7715CA80-4305-456B-9F66-2CED43E30AEF}.Debug|x64.Build.0 = Debug|Any CPU
{7715CA80-4305-456B-9F66-2CED43E30AEF}.Debug|x86.ActiveCfg = Debug|Any CPU
{7715CA80-4305-456B-9F66-2CED43E30AEF}.Debug|x86.Build.0 = Debug|Any CPU
{7715CA80-4305-456B-9F66-2CED43E30AEF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7715CA80-4305-456B-9F66-2CED43E30AEF}.Release|Any CPU.Build.0 = Release|Any CPU
{7715CA80-4305-456B-9F66-2CED43E30AEF}.Release|x64.ActiveCfg = Release|Any CPU
{7715CA80-4305-456B-9F66-2CED43E30AEF}.Release|x64.Build.0 = Release|Any CPU
{7715CA80-4305-456B-9F66-2CED43E30AEF}.Release|x86.ActiveCfg = Release|Any CPU
{7715CA80-4305-456B-9F66-2CED43E30AEF}.Release|x86.Build.0 = Release|Any CPU
{CE0516F7-78D2-474F-A4A1-6ED97EB7CD9D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CE0516F7-78D2-474F-A4A1-6ED97EB7CD9D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CE0516F7-78D2-474F-A4A1-6ED97EB7CD9D}.Debug|x64.ActiveCfg = Debug|Any CPU
{CE0516F7-78D2-474F-A4A1-6ED97EB7CD9D}.Debug|x64.Build.0 = Debug|Any CPU
{CE0516F7-78D2-474F-A4A1-6ED97EB7CD9D}.Debug|x86.ActiveCfg = Debug|Any CPU
{CE0516F7-78D2-474F-A4A1-6ED97EB7CD9D}.Debug|x86.Build.0 = Debug|Any CPU
{CE0516F7-78D2-474F-A4A1-6ED97EB7CD9D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CE0516F7-78D2-474F-A4A1-6ED97EB7CD9D}.Release|Any CPU.Build.0 = Release|Any CPU
{CE0516F7-78D2-474F-A4A1-6ED97EB7CD9D}.Release|x64.ActiveCfg = Release|Any CPU
{CE0516F7-78D2-474F-A4A1-6ED97EB7CD9D}.Release|x64.Build.0 = Release|Any CPU
{CE0516F7-78D2-474F-A4A1-6ED97EB7CD9D}.Release|x86.ActiveCfg = Release|Any CPU
{CE0516F7-78D2-474F-A4A1-6ED97EB7CD9D}.Release|x86.Build.0 = Release|Any CPU
{8669819B-654F-4E41-9030-1CCA56D64E88}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator
{8669819B-654F-4E41-9030-1CCA56D64E88}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator
{8669819B-654F-4E41-9030-1CCA56D64E88}.Debug|x64.ActiveCfg = Debug|iPhoneSimulator
{8669819B-654F-4E41-9030-1CCA56D64E88}.Debug|x64.Build.0 = Debug|iPhoneSimulator
{8669819B-654F-4E41-9030-1CCA56D64E88}.Debug|x86.ActiveCfg = Debug|iPhoneSimulator
{8669819B-654F-4E41-9030-1CCA56D64E88}.Debug|x86.Build.0 = Debug|iPhoneSimulator
{8669819B-654F-4E41-9030-1CCA56D64E88}.Release|Any CPU.ActiveCfg = Release|iPhoneSimulator
{8669819B-654F-4E41-9030-1CCA56D64E88}.Release|Any CPU.Build.0 = Release|iPhoneSimulator
{8669819B-654F-4E41-9030-1CCA56D64E88}.Release|x64.ActiveCfg = Release|iPhoneSimulator
{8669819B-654F-4E41-9030-1CCA56D64E88}.Release|x64.Build.0 = Release|iPhoneSimulator
{8669819B-654F-4E41-9030-1CCA56D64E88}.Release|x86.ActiveCfg = Release|iPhoneSimulator
{8669819B-654F-4E41-9030-1CCA56D64E88}.Release|x86.Build.0 = Release|iPhoneSimulator
{70B06D00-CEA9-47CD-8781-10CA48376046}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{70B06D00-CEA9-47CD-8781-10CA48376046}.Debug|Any CPU.Build.0 = Debug|Any CPU
{70B06D00-CEA9-47CD-8781-10CA48376046}.Debug|x64.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -2995,10 +2921,6 @@ Global
{F16EDD0F-5ABE-4B25-98EE-8397E55B5CBA} = {23324041-2076-477C-A4BF-B385B8066C6C}
{FF526329-094A-4B25-ABC5-750D62E48101} = {23324041-2076-477C-A4BF-B385B8066C6C}
{377A7D9A-2691-4683-AB81-03B1642B3A78} = {FA9D1C95-5585-4DEC-B226-1447A486C376}
{61EA5E26-EC46-432B-817F-B39122085586} = {23324041-2076-477C-A4BF-B385B8066C6C}
{20E576FC-D978-4CA3-9A4D-775C6432C213} = {61EA5E26-EC46-432B-817F-B39122085586}
{603F28D1-E982-47C0-98D9-3E6DA1DD37E2} = {488775D1-32CC-46D7-8DD7-BB331EC659B9}
{488775D1-32CC-46D7-8DD7-BB331EC659B9} = {23324041-2076-477C-A4BF-B385B8066C6C}
{B9A8D738-FE7D-4860-A446-4A03E3DDEB74} = {0651C5EF-50AA-4598-8D9C-8F210ADD8490}
{F2CF5D32-4B41-425E-B229-8FFC48F88063} = {16AFCF73-8CC1-4B5D-8969-A90F468DC6D5}
{F3B7A9D6-5B15-45E8-925B-20B5BBD33428} = {F2CF5D32-4B41-425E-B229-8FFC48F88063}
Expand Down Expand Up @@ -3031,9 +2953,6 @@ Global
{A87F77B1-D38E-46E5-822A-097F0370D1D0} = {39B598E9-44BA-4A61-A1BB-7C543734DBA6}
{0BD1088B-D0DB-4080-B2BE-1CF5A97EB518} = {39B598E9-44BA-4A61-A1BB-7C543734DBA6}
{6E61C442-66B0-429E-BE5D-4ACD0045F0A5} = {39B598E9-44BA-4A61-A1BB-7C543734DBA6}
{7715CA80-4305-456B-9F66-2CED43E30AEF} = {39B598E9-44BA-4A61-A1BB-7C543734DBA6}
{CE0516F7-78D2-474F-A4A1-6ED97EB7CD9D} = {39B598E9-44BA-4A61-A1BB-7C543734DBA6}
{8669819B-654F-4E41-9030-1CCA56D64E88} = {39B598E9-44BA-4A61-A1BB-7C543734DBA6}
{70B06D00-CEA9-47CD-8781-10CA48376046} = {39B598E9-44BA-4A61-A1BB-7C543734DBA6}
{28760ABB-EB0F-4216-97B0-0DAC5FC27533} = {39B598E9-44BA-4A61-A1BB-7C543734DBA6}
{5E5433D4-0285-48AC-82EA-FA0F8C227707} = {39B598E9-44BA-4A61-A1BB-7C543734DBA6}
Expand Down
4 changes: 0 additions & 4 deletions build/nuke/.editorconfig
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
[*.cs]
dotnet_style_qualification_for_field = false:warning
dotnet_style_qualification_for_property = false:warning
dotnet_style_qualification_for_method = false:warning
dotnet_style_qualification_for_event = false:warning
dotnet_style_require_accessibility_modifiers = never:warning

csharp_style_expression_bodied_methods = true:silent
Expand Down
72 changes: 72 additions & 0 deletions build/nuke/Build.CodeSigning.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System;
using System.IO;
using System.Linq;
using Nuke.Common;
using Nuke.Common.CI;
using Nuke.Common.Tooling;
using Nuke.Common.Tools.DotNet;
using Nuke.Common.Tools.SignClient;
using static Nuke.Common.Tools.DotNet.DotNetTasks;
using static Nuke.Common.Tools.SignClient.SignClientTasks;

partial class Build
{
[Parameter("Code-signing service username")] readonly string SignUsername;
[Parameter("Code-signing service password")] readonly string SignPassword;
bool CanCodeSign => !string.IsNullOrWhiteSpace(SignUsername) && !string.IsNullOrWhiteSpace(SignPassword);

Target SignPackages => CommonTarget
(
x => x.Before(PushToNuGet)
.After(Pack)
.Produces("build/output_packages/*.nupkg")
.Executes
(
() =>
{
if (!CanCodeSign)
{
ControlFlow.Fail("SignClient username and/or password not specified.");
}

var outputs = Enumerable.Empty<Output>();
var basePath = RootDirectory / "build" / "codesigning";
var execPath = basePath / "tool" / (OperatingSystem.IsWindows() ? "SignClient.exe" : "SignClient");
if (!File.Exists(execPath))
{
outputs = outputs.Concat
(
DotNetToolInstall
(
s => s.SetToolInstallationPath(basePath / "tool")
.SetPackageName("SignClient")
)
);
}

return Packages.Aggregate
(
outputs, (current, pkg) => current.Concat
(
SignClientSign
(
s => s.SetProcessToolPath(execPath)
.SetBaseDirectory(PackageDirectory)
.SetInput(pkg)
.SetConfig(basePath / "config.json")
.SetFileList(basePath / "filelist.txt")
.SetUsername(SignUsername)
.SetSecret(SignPassword)
.SetName("Silk.NET")
.SetDescription("Silk.NET")
.SetDescriptionUrl("https://github.com/dotnet/Silk.NET")
)
)
);
}
)
);
}
114 changes: 114 additions & 0 deletions build/nuke/Build.Core.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using Nuke.Common;
using Nuke.Common.Tooling;
using Nuke.Common.Tools.DotNet;
using static Nuke.Common.IO.FileSystemTasks;
using static Nuke.Common.Tools.DotNet.DotNetTasks;
using static Nuke.Common.Tooling.ProcessTasks;

partial class Build
{
[Parameter("If specified, when using the clean target removes the generated solution and stops.", Name = "Sln")]
readonly bool CleanSln;

Target Clean => CommonTarget
(
x => x.Before(Restore)
.Executes
(
() =>
{
if (CleanSln)
{
DeleteFile(RootDirectory / "Silk.NET.gen.sln");
return Enumerable.Empty<Output>();
}

var outputs = Enumerable.Empty<Output>();
outputs = outputs.Concat
(
DotNetClean
(
s => s.SetProject(Solution)
.SetProperties(ProcessedMsbuildProperties)
)
);

if (Directory.Exists(RootDirectory / "build" / "output_packages"))
{
Directory.Delete(RootDirectory / "build" / "output_packages", true);
}

Directory.CreateDirectory(RootDirectory / "build" / "output_packages");

if (Native)
{
var silkDroid = SourceDirectory / "Windowing" / "SilkDroid";
using var process = RuntimeInformation.IsOSPlatform(OSPlatform.Linux)
? StartProcess("bash", "-c \"./gradlew clean\"", silkDroid)
: StartProcess("cmd", "/c \".\\gradlew clean\"", silkDroid);
process.AssertZeroExitCode();
outputs = outputs.Concat(process.Output);
}
else
{
Logger.Warn("Skipping gradlew clean as the \"native\" feature-set has not been specified.");
}

return outputs;
}
)
);

Target Restore => CommonTarget
(
x => x.After(Clean)
.Executes
(
() => DotNetRestore
(
s => s.SetProjectFile(Solution)
.SetProperties(ProcessedMsbuildProperties)
)
)
);

Target Compile => CommonTarget
(
x => x.DependsOn(Restore)
.After(Clean)
.Executes
(
() => DotNetBuild
(
s => s.SetProjectFile(Solution)
.SetConfiguration(Configuration)
.EnableNoRestore()
.SetProperties(ProcessedMsbuildProperties)
)
)
);

Target Test => CommonTarget
(
x => x.After(Compile)
.Executes
(
() =>
{
foreach (var project in Solution.GetProjects("*"))
{
if (project.Name.EndsWith(".Tests"))
{
DotNetTest(s => s.SetProjectFile(project));
}
}
}
)
);
}
Loading