diff --git a/.nuke/build.schema.json b/.nuke/build.schema.json index 7616e4d..3166f3e 100644 --- a/.nuke/build.schema.json +++ b/.nuke/build.schema.json @@ -1,19 +1,56 @@ { "$schema": "http://json-schema.org/draft-04/schema#", - "$ref": "#/definitions/build", - "title": "Build Schema", "definitions": { - "build": { - "type": "object", + "Host": { + "type": "string", + "enum": [ + "AppVeyor", + "AzurePipelines", + "Bamboo", + "Bitbucket", + "Bitrise", + "GitHubActions", + "GitLab", + "Jenkins", + "Rider", + "SpaceAutomation", + "TeamCity", + "Terminal", + "TravisCI", + "VisualStudio", + "VSCode" + ] + }, + "ExecutableTarget": { + "type": "string", + "enum": [ + "Clean", + "Compile", + "CopyFiles", + "CreatePackage", + "Default", + "Package", + "PrePublish", + "Publish", + "PublishPackage", + "PublishPreRelease", + "PublishRelease", + "Restore", + "RunUnitTests" + ] + }, + "Verbosity": { + "type": "string", + "description": "", + "enum": [ + "Verbose", + "Normal", + "Minimal", + "Quiet" + ] + }, + "NukeBuild": { "properties": { - "Configuration": { - "type": "string", - "description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)", - "enum": [ - "Debug", - "Release" - ] - }, "Continue": { "type": "boolean", "description": "Indicates to continue a previously failed build attempt" @@ -23,25 +60,8 @@ "description": "Shows the help text for this build assembly" }, "Host": { - "type": "string", "description": "Host for execution. Default is 'automatic'", - "enum": [ - "AppVeyor", - "AzurePipelines", - "Bamboo", - "Bitbucket", - "Bitrise", - "GitHubActions", - "GitLab", - "Jenkins", - "Rider", - "SpaceAutomation", - "TeamCity", - "Terminal", - "TravisCI", - "VisualStudio", - "VSCode" - ] + "$ref": "#/definitions/Host" }, "NoLogo": { "type": "boolean", @@ -62,10 +82,6 @@ "type": "string" } }, - "ReleaseNotesFilePath": { - "type": "string", - "description": "ReleaseNotesFilePath - To determine the SemanticVersion" - }, "Root": { "type": "string", "description": "Root directory during build execution" @@ -74,61 +90,46 @@ "type": "array", "description": "List of targets to be skipped. Empty list skips all dependencies", "items": { - "type": "string", - "enum": [ - "Clean", - "Compile", - "CopyFiles", - "CreatePackage", - "Default", - "Package", - "PrePublish", - "Publish", - "PublishPackage", - "PublishPreRelease", - "PublishRelease", - "Restore", - "RunUnitTests" - ] + "$ref": "#/definitions/ExecutableTarget" } }, - "Solution": { - "type": "string", - "description": "Path to a solution file that is automatically loaded" - }, "Target": { "type": "array", "description": "List of targets to be invoked. Default is '{default_target}'", "items": { - "type": "string", - "enum": [ - "Clean", - "Compile", - "CopyFiles", - "CreatePackage", - "Default", - "Package", - "PrePublish", - "Publish", - "PublishPackage", - "PublishPreRelease", - "PublishRelease", - "Restore", - "RunUnitTests" - ] + "$ref": "#/definitions/ExecutableTarget" } }, "Verbosity": { - "type": "string", "description": "Logging verbosity during build execution. Default is 'Normal'", + "$ref": "#/definitions/Verbosity" + } + } + } + }, + "allOf": [ + { + "properties": { + "Configuration": { + "type": "string", + "description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)", "enum": [ - "Minimal", - "Normal", - "Quiet", - "Verbose" + "Debug", + "Release" ] + }, + "ReleaseNotesFilePath": { + "type": "string", + "description": "ReleaseNotesFilePath - To determine the SemanticVersion" + }, + "Solution": { + "type": "string", + "description": "Path to a solution file that is automatically loaded" } } + }, + { + "$ref": "#/definitions/NukeBuild" } - } + ] } diff --git a/nuke/Build.cs b/nuke/Build.cs index d8cd73a..cc011ea 100644 --- a/nuke/Build.cs +++ b/nuke/Build.cs @@ -15,9 +15,10 @@ using System.IO; using System.Linq; using Nuke.Common.Tooling; -using static Nuke.Common.IO.FileSystemTasks; + using static Nuke.Common.Tools.DotNet.DotNetTasks; using static Nuke.Common.Tools.NuGet.NuGetTasks; + using Project = Nuke.Common.ProjectModel.Project; class Build : NukeBuild @@ -143,7 +144,7 @@ protected override void OnBuildInitialized() .EnableNoRestore() .EnableNoBuild() .SetProcessEnvironmentVariable("prefetched", "false") - .When(GitHubActions.Instance is not null, x => x.SetLoggers("GitHubActions")) + .When(_ => GitHubActions.Instance is not null, x => x.SetLoggers("GitHubActions")) ); DotNetTest(s => s @@ -152,7 +153,7 @@ protected override void OnBuildInitialized() .EnableNoRestore() .EnableNoBuild() .SetProcessEnvironmentVariable("prefetched", "true") - .When(GitHubActions.Instance is not null, x => x.SetLoggers("GitHubActions")) + .When(_ => GitHubActions.Instance is not null, x => x.SetLoggers("GitHubActions")) ); }); @@ -165,14 +166,14 @@ protected override void OnBuildInitialized() var targetDir = NugetDirectory / "lib" / item; var srcDir = BuildDirectory / item; - CopyFile(srcDir / $"{TargetProjectName}.dll", targetDir / $"{TargetProjectName}.dll", FileExistsPolicy.OverwriteIfNewer); - CopyFile(srcDir / $"{TargetProjectName}.pdb", targetDir / $"{TargetProjectName}.pdb", FileExistsPolicy.OverwriteIfNewer); - CopyFile(srcDir / $"{TargetProjectName}.xml", targetDir / $"{TargetProjectName}.xml", FileExistsPolicy.OverwriteIfNewer); + (srcDir / $"{TargetProjectName}.dll").Copy(targetDir / $"{TargetProjectName}.dll", policy: ExistsPolicy.FileOverwriteIfNewer); + (srcDir / $"{TargetProjectName}.pdb").Copy(targetDir / $"{TargetProjectName}.pdb", policy: ExistsPolicy.FileOverwriteIfNewer); + (srcDir / $"{TargetProjectName}.xml").Copy(targetDir / $"{TargetProjectName}.xml", policy: ExistsPolicy.FileOverwriteIfNewer); } - CopyFile(SourceDirectory / $"{TargetProjectName}.nuspec", NugetDirectory / $"{TargetProjectName}.nuspec", FileExistsPolicy.OverwriteIfNewer); - CopyFile(RootDirectory / "logo.png", NugetDirectory / "logo.png", FileExistsPolicy.OverwriteIfNewer); - CopyFile(RootDirectory / "README.md", NugetDirectory / "README.md", FileExistsPolicy.OverwriteIfNewer); + (SourceDirectory / $"{TargetProjectName}.nuspec").Copy(NugetDirectory / $"{TargetProjectName}.nuspec", policy: ExistsPolicy.FileOverwriteIfNewer); + (RootDirectory / "logo.png").Copy(NugetDirectory / "logo.png", policy: ExistsPolicy.FileOverwriteIfNewer); + (RootDirectory / "README.md").Copy(NugetDirectory / "README.md", policy: ExistsPolicy.FileOverwriteIfNewer); }); Target CreatePackage => _ => _ diff --git a/nuke/_build.csproj b/nuke/_build.csproj index a71fa1b..3258f31 100644 --- a/nuke/_build.csproj +++ b/nuke/_build.csproj @@ -11,11 +11,11 @@ </PropertyGroup> <ItemGroup> - <PackageReference Include="Nuke.Common" Version="8.0.0" /> + <PackageReference Include="Nuke.Common" Version="9.0.4" /> </ItemGroup> <ItemGroup> - <PackageDownload Include="NuGet.CommandLine" Version="[6.3.1]" /> + <PackageDownload Include="NuGet.CommandLine" Version="[6.12.2]" /> </ItemGroup> </Project> diff --git a/src/AngleSharp.Js.Tests/AngleSharp.Js.Tests.csproj b/src/AngleSharp.Js.Tests/AngleSharp.Js.Tests.csproj index 0c9e57d..9a61a14 100644 --- a/src/AngleSharp.Js.Tests/AngleSharp.Js.Tests.csproj +++ b/src/AngleSharp.Js.Tests/AngleSharp.Js.Tests.csproj @@ -1,7 +1,7 @@ <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">net6.0;net7.0;net8.0</TargetFrameworks> - <TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">net462;net472;net6.0;net7.0;net8.0</TargetFrameworks> + <TargetFrameworks>net8.0</TargetFrameworks> + <TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">$(TargetFrameworks);net462;net472</TargetFrameworks> <IsPackable>false</IsPackable> <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> <!-- https://github.com/Tyrrrz/GitHubActionsTestLogger/issues/5 --> </PropertyGroup> @@ -14,7 +14,7 @@ <ItemGroup> <PackageReference Include="AngleSharp.Io" Version="1.0.0" /> - <PackageReference Include="GitHubActionsTestLogger" Version="2.3.3"> + <PackageReference Include="GitHubActionsTestLogger" Version="2.4.1"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> </PackageReference> @@ -22,7 +22,7 @@ <PackageReference Include="AngleSharp.Xml" Version="1.0.0" /> <PackageReference Include="Newtonsoft.Json" Version="13.0.3" /> <PackageReference Include="NUnit" Version="3.14.0" /> - <PackageReference Include="NUnit3TestAdapter" Version="4.5.0" /> - <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" /> + <PackageReference Include="NUnit3TestAdapter" Version="4.6.0" /> + <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" /> </ItemGroup> </Project> diff --git a/src/AngleSharp.Js/AngleSharp.Js.csproj b/src/AngleSharp.Js/AngleSharp.Js.csproj index f0fd16d..e2a7010 100644 --- a/src/AngleSharp.Js/AngleSharp.Js.csproj +++ b/src/AngleSharp.Js/AngleSharp.Js.csproj @@ -1,6 +1,6 @@ <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFrameworks>netstandard2.0;net6.0;net7.0;net8.0</TargetFrameworks> + <TargetFrameworks>netstandard2.0;net8.0</TargetFrameworks> <TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">$(TargetFrameworks);net462;net472</TargetFrameworks> <GenerateDocumentationFile>true</GenerateDocumentationFile> <RepositoryUrl>https://github.com/AngleSharp/AngleSharp.Js</RepositoryUrl> @@ -18,7 +18,7 @@ <ItemGroup> <PackageReference Include="AngleSharp" Version="1.1.2" /> - <PackageReference Include="Jint" Version="4.0.0" /> + <PackageReference Include="Jint" Version="4.1.0" /> </ItemGroup> <PropertyGroup Condition=" '$(OS)' == 'Windows_NT' ">