From a5caf9f1a05c7a6e62451df76d60f2200ab180a0 Mon Sep 17 00:00:00 2001 From: Marko Lahma Date: Sun, 26 Jan 2025 20:29:17 +0200 Subject: [PATCH] Upgrade to NUKE 9 and remove obsolete NET 6 targets --- .nuke/build.schema.json | 46 +++++++++++-------- .../NPOI.OpenXmlFormats.Core.csproj | 2 +- .../NPOI.Benchmarks/NPOI.Benchmarks.csproj | 2 +- build/Build.cs | 4 +- build/_build.csproj | 2 +- main/NPOI.Core.csproj | 2 +- ooxml/NPOI.OOXML.Core.csproj | 2 +- openxml4Net/NPOI.OpenXml4Net.Core.csproj | 2 +- solution/NPOI.Pack.csproj | 2 +- 9 files changed, 35 insertions(+), 29 deletions(-) diff --git a/.nuke/build.schema.json b/.nuke/build.schema.json index d8ba2a41c..6404942e8 100644 --- a/.nuke/build.schema.json +++ b/.nuke/build.schema.json @@ -1,24 +1,5 @@ { "$schema": "http://json-schema.org/draft-04/schema#", - "properties": { - "Configuration": { - "type": "string", - "description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)", - "enum": [ - "Debug", - "Release" - ] - }, - "GitHubToken": { - "type": "string", - "description": "GitHub API token", - "default": "Secrets must be entered via 'nuke :secrets [profile]'" - }, - "Solution": { - "type": "string", - "description": "Path to a solution file that is automatically loaded" - } - }, "definitions": { "Host": { "type": "string", @@ -119,5 +100,30 @@ } } }, - "$ref": "#/definitions/NukeBuild" + "allOf": [ + { + "properties": { + "Configuration": { + "type": "string", + "description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)", + "enum": [ + "Debug", + "Release" + ] + }, + "GitHubToken": { + "type": "string", + "description": "GitHub API token", + "default": "Secrets must be entered via 'nuke :secrets [profile]'" + }, + "Solution": { + "type": "string", + "description": "Path to a solution file that is automatically loaded" + } + } + }, + { + "$ref": "#/definitions/NukeBuild" + } + ] } diff --git a/OpenXmlFormats/NPOI.OpenXmlFormats.Core.csproj b/OpenXmlFormats/NPOI.OpenXmlFormats.Core.csproj index 9427acae1..799db04c2 100644 --- a/OpenXmlFormats/NPOI.OpenXmlFormats.Core.csproj +++ b/OpenXmlFormats/NPOI.OpenXmlFormats.Core.csproj @@ -1,7 +1,7 @@  - net472;netstandard2.0;netstandard2.1;net6.0 + net472;netstandard2.0;netstandard2.1;net8.0 NPOI.OpenXmlFormats NPOI.OpenXmlFormats true diff --git a/benchmarks/NPOI.Benchmarks/NPOI.Benchmarks.csproj b/benchmarks/NPOI.Benchmarks/NPOI.Benchmarks.csproj index 081512e76..b5a548f40 100644 --- a/benchmarks/NPOI.Benchmarks/NPOI.Benchmarks.csproj +++ b/benchmarks/NPOI.Benchmarks/NPOI.Benchmarks.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net8.0 enable diff --git a/build/Build.cs b/build/Build.cs index 894929859..e34aabf9c 100644 --- a/build/Build.cs +++ b/build/Build.cs @@ -125,8 +125,8 @@ partial class Build : NukeBuild .EnableNoRestore() .SetConfiguration(Configuration) .SetProjectFile(Solution) - .When(Host is GitHubActions, settings => settings.SetLoggers("GitHubActions")) - .When(!RuntimeInformation.IsOSPlatform(OSPlatform.Windows), settings => settings.SetFramework("net6.0")) + .When(_ => Host is GitHubActions, settings => settings.SetLoggers("GitHubActions")) + .When(_ => !RuntimeInformation.IsOSPlatform(OSPlatform.Windows), settings => settings.SetFramework("net8.0")) ); }); diff --git a/build/_build.csproj b/build/_build.csproj index 3200e0c89..e02adb1e1 100644 --- a/build/_build.csproj +++ b/build/_build.csproj @@ -12,7 +12,7 @@ - + diff --git a/main/NPOI.Core.csproj b/main/NPOI.Core.csproj index d198139b4..8f998ddac 100644 --- a/main/NPOI.Core.csproj +++ b/main/NPOI.Core.csproj @@ -1,7 +1,7 @@  - net472;netstandard2.0;netstandard2.1;net6.0 + net472;netstandard2.0;netstandard2.1;net8.0 NPOI true ..\npoi.snk diff --git a/ooxml/NPOI.OOXML.Core.csproj b/ooxml/NPOI.OOXML.Core.csproj index 6eae2d675..aad416d76 100644 --- a/ooxml/NPOI.OOXML.Core.csproj +++ b/ooxml/NPOI.OOXML.Core.csproj @@ -1,7 +1,7 @@ - net472;netstandard2.0;netstandard2.1;net6.0 + net472;netstandard2.0;netstandard2.1;net8.0 NPOI.OOXML NPOI true diff --git a/openxml4Net/NPOI.OpenXml4Net.Core.csproj b/openxml4Net/NPOI.OpenXml4Net.Core.csproj index 15fbb7c9c..5414306bd 100644 --- a/openxml4Net/NPOI.OpenXml4Net.Core.csproj +++ b/openxml4Net/NPOI.OpenXml4Net.Core.csproj @@ -1,7 +1,7 @@  - net472;netstandard2.0;netstandard2.1;net6.0 + net472;netstandard2.0;netstandard2.1;net8.0 NPOI.OpenXml4Net NPOI.OpenXml4Net true diff --git a/solution/NPOI.Pack.csproj b/solution/NPOI.Pack.csproj index a00d1a155..dc09a34ae 100644 --- a/solution/NPOI.Pack.csproj +++ b/solution/NPOI.Pack.csproj @@ -3,7 +3,7 @@ - net472;netstandard2.0;netstandard2.1;net6.0 + net472;netstandard2.0;netstandard2.1;net8.0 false NPOI ..\solution\$(Configuration)\