From cf08e293975983e8883721f7b9622c87158c32e2 Mon Sep 17 00:00:00 2001 From: Louis Seubert Date: Mon, 19 Oct 2026 18:27:59 +0200 Subject: [PATCH] feat(sdk): integrate NuGet packaging metadata defaults --- Directory.Build.props | 20 ++----------- Directory.Build.targets | 1 + src/sdk/Geekeey.Arcade.NET.Sdk.Test.csproj | 2 ++ src/sdk/Geekeey.Arcade.NET.Sdk.Web.csproj | 2 ++ src/sdk/Geekeey.Arcade.NET.Sdk.csproj | 2 ++ src/sdk/README.md | 23 ++++++++++++++- src/sdk/common/Common.props | 14 +++++---- src/sdk/common/Common.targets | 34 ++++++++++++++++++++++ 8 files changed, 73 insertions(+), 25 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index f98619b..5d86ec8 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,23 +1,7 @@ + + $(MSBuildThisFileDirectory)artifacts - - - enable - enable - - - - Recommended - latest - true - nullable - true - - - - moderate - all - diff --git a/Directory.Build.targets b/Directory.Build.targets index 8c119d5..8913fe1 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -1,2 +1,3 @@ + diff --git a/src/sdk/Geekeey.Arcade.NET.Sdk.Test.csproj b/src/sdk/Geekeey.Arcade.NET.Sdk.Test.csproj index 47b2019..623ec3a 100644 --- a/src/sdk/Geekeey.Arcade.NET.Sdk.Test.csproj +++ b/src/sdk/Geekeey.Arcade.NET.Sdk.Test.csproj @@ -4,6 +4,8 @@ true false true + false + MSBuild SDK for test projects with standardized build, analyzer, and editor configuration defaults. diff --git a/src/sdk/Geekeey.Arcade.NET.Sdk.Web.csproj b/src/sdk/Geekeey.Arcade.NET.Sdk.Web.csproj index 175dc82..a8ae420 100644 --- a/src/sdk/Geekeey.Arcade.NET.Sdk.Web.csproj +++ b/src/sdk/Geekeey.Arcade.NET.Sdk.Web.csproj @@ -4,6 +4,8 @@ true false true + false + MSBuild SDK for ASP.NET Core web projects with standardized build, analyzer, and editor configuration defaults. diff --git a/src/sdk/Geekeey.Arcade.NET.Sdk.csproj b/src/sdk/Geekeey.Arcade.NET.Sdk.csproj index 2f76c29..9b79579 100644 --- a/src/sdk/Geekeey.Arcade.NET.Sdk.csproj +++ b/src/sdk/Geekeey.Arcade.NET.Sdk.csproj @@ -4,6 +4,8 @@ true false true + false + MSBuild SDK for .NET projects with standardized build, analyzer, and editor configuration defaults. diff --git a/src/sdk/README.md b/src/sdk/README.md index cd9c5ac..9f39417 100644 --- a/src/sdk/README.md +++ b/src/sdk/README.md @@ -1 +1,22 @@ -# Geekeey.Arcade.Sdk +# Geekeey.Arcade.NET.Sdk + +Opinionated MSBuild SDKs for .NET projects with standardized build, analyzer, and editor configuration defaults: + +- `Geekeey.Arcade.NET.Sdk` — base SDK +- `Geekeey.Arcade.NET.Sdk.Web` — ASP.NET Core web projects +- `Geekeey.Arcade.NET.Sdk.Test` — test projects + +## Packaging metadata + +Set these properties in your project file or a directory-level props file. Unless stated otherwise, defaults apply only when the property is empty. + +| Property | Default | Description | +| --- | --- | --- | +| `Authors` | `The Geekeey Team` | Default authors when no value is set. | +| `Copyright` | `Copyright (c) The Geekeey Team` | Default copyright when no value is set. | +| `PublishRepositoryUrl` | `true` | Publishes the repository URL in packages. | +| `IncludeSymbols` | `true` | Packs a symbol package. | +| `SymbolPackageFormat` | `snupkg` | Format of the symbol package. | +| `PackageReadmeFile` | `README.md` when found | Packs a README file from the project directory as the package readme. | +| `SearchReadmeFileAbove` | `false` | When `true`, searches parent directories for a README to pack. | +| `PackageLicenseFile` | Detected license file | Packs and declares a `LICENSE.txt`, `LICENSE.md` or `LICENSE` file found in the project directory or a parent directory. Skipped when the project sets `PackageLicenseExpression` or `PackageLicenseFile`. | diff --git a/src/sdk/common/Common.props b/src/sdk/common/Common.props index 8caf818..8a60993 100644 --- a/src/sdk/common/Common.props +++ b/src/sdk/common/Common.props @@ -18,11 +18,13 @@ - The Geekeey Team - Copyright (c) The Geekeey Team - true - true - snupkg + The Geekeey Team + Copyright (c) The Geekeey Team + + true + + true + snupkg @@ -38,7 +40,7 @@ false - + true low all diff --git a/src/sdk/common/Common.targets b/src/sdk/common/Common.targets index 0222c0d..ed4ab3b 100644 --- a/src/sdk/common/Common.targets +++ b/src/sdk/common/Common.targets @@ -36,4 +36,38 @@ + + + + <_PackageReadmeFilePath Condition="'$(_PackageReadmeFilePath)' == '' AND Exists('$(MSBuildProjectDirectory)/README.md')">$(MSBuildProjectDirectory)/README.md + <_PackageReadmeFilePath Condition="'$(_PackageReadmeFilePath)' == '' AND Exists('$(MSBuildProjectDirectory)/readme.md')">$(MSBuildProjectDirectory)/readme.md + <_PackageReadmeFilePath Condition="'$(_PackageReadmeFilePath)' == '' AND Exists('$(MSBuildProjectDirectory)/Readme.md')">$(MSBuildProjectDirectory)/Readme.md + <_PackageReadmeFilePath Condition="'$(_PackageReadmeFilePath)' == '' AND Exists('$(MSBuildProjectDirectory)/ReadMe.md')">$(MSBuildProjectDirectory)/ReadMe.md + + <_PackageReadmeFilePath Condition="'$(SearchReadmeFileAbove)' == 'true' AND '$(_PackageReadmeFilePath)' == '' AND Exists($([MSBuild]::GetPathOfFileAbove('README.md', '$(MSBuildProjectDirectory)')))">$([MSBuild]::GetPathOfFileAbove('README.md', '$(MSBuildProjectDirectory)')) + <_PackageReadmeFilePath Condition="'$(SearchReadmeFileAbove)' == 'true' AND '$(_PackageReadmeFilePath)' == '' AND Exists($([MSBuild]::GetPathOfFileAbove('readme.md', '$(MSBuildProjectDirectory)')))">$([MSBuild]::GetPathOfFileAbove('readme.md', '$(MSBuildProjectDirectory)')) + <_PackageReadmeFilePath Condition="'$(SearchReadmeFileAbove)' == 'true' AND '$(_PackageReadmeFilePath)' == '' AND Exists($([MSBuild]::GetPathOfFileAbove('Readme.md', '$(MSBuildProjectDirectory)')))">$([MSBuild]::GetPathOfFileAbove('Readme.md', '$(MSBuildProjectDirectory)')) + <_PackageReadmeFilePath Condition="'$(SearchReadmeFileAbove)' == 'true' AND '$(_PackageReadmeFilePath)' == '' AND Exists($([MSBuild]::GetPathOfFileAbove('ReadMe.md', '$(MSBuildProjectDirectory)')))">$([MSBuild]::GetPathOfFileAbove('ReadMe.md', '$(MSBuildProjectDirectory)')) + + <_PackageThirdPartyNoticesPath Condition="'$(_PackageThirdPartyNoticesPath)' == '' AND Exists('$(MSBuildProjectDirectory)/THIRD-PARTY-NOTICES.TXT')">$(MSBuildProjectDirectory)/THIRD-PARTY-NOTICES.TXT + <_PackageThirdPartyNoticesPath Condition="'$(_PackageThirdPartyNoticesPath)' == '' AND Exists('$(MSBuildProjectDirectory)/THIRD-PARTY-NOTICES.txt')">$(MSBuildProjectDirectory)/THIRD-PARTY-NOTICES.txt + <_PackageThirdPartyNoticesPath Condition="'$(_PackageThirdPartyNoticesPath)' == '' AND Exists('$(MSBuildProjectDirectory)/THIRD-PARTY-NOTICES.MD')">$(MSBuildProjectDirectory)/THIRD-PARTY-NOTICES.MD + <_PackageThirdPartyNoticesPath Condition="'$(_PackageThirdPartyNoticesPath)' == '' AND Exists('$(MSBuildProjectDirectory)/THIRD-PARTY-NOTICES.md')">$(MSBuildProjectDirectory)/THIRD-PARTY-NOTICES.md + + + <_LicensePath Condition="'$(_LicensePath)' == '' AND Exists($([MSBuild]::GetPathOfFileAbove('LICENSE.txt', '$(MSBuildProjectDirectory)')))">$([MSBuild]::GetPathOfFileAbove('LICENSE.txt', '$(MSBuildProjectDirectory)')) + <_LicensePath Condition="'$(_LicensePath)' == '' AND Exists($([MSBuild]::GetPathOfFileAbove('LICENSE.md', '$(MSBuildProjectDirectory)')))">$([MSBuild]::GetPathOfFileAbove('LICENSE.md', '$(MSBuildProjectDirectory)')) + <_LicensePath Condition="'$(_LicensePath)' == '' AND Exists($([MSBuild]::GetPathOfFileAbove('LICENSE', '$(MSBuildProjectDirectory)')))">$([MSBuild]::GetPathOfFileAbove('LICENSE', '$(MSBuildProjectDirectory)')) + + README.md + + $([System.IO.Path]::GetFileName($(_LicensePath))) + + + + + + +