From db148e8d997bf4d6653ed4dd1e5cf01911ae69f4 Mon Sep 17 00:00:00 2001 From: "David G. Moore, Jr." Date: Sun, 7 Apr 2024 00:41:39 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20(PackageTags.props):=20Remove=20?= =?UTF-8?q?redundant=20SetPackageTags=20property=20in=20PackageTags.props?= =?UTF-8?q?=20file=20=F0=9F=94=A7=20(ACustomItemTypes.targets,=20PackageTa?= =?UTF-8?q?gs.targets):=20Refactor=20PackageReferences=20to=20include=20on?= =?UTF-8?q?ly=20the=20identity=20in=20SourceGeneratorPackageReference,=20S?= =?UTF-8?q?ourceGeneratorProjectReference,=20SourceCodePackageReference,?= =?UTF-8?q?=20and=20UsingsPackageReference?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adding Sdk.Web & Sdk.WebAssembly Making these files SDK-neutral Update pack.yml some changes Fixing this Changes --- .frontmatter/database/mediaDb.json | 2 +- .github/workflows/pack.yml | 2 + Test/Directory.Build.props | 2 +- Test/Directory.Build.targets | 2 +- src/Build/ACustomItemTypes.props | 1 + src/Build/ACustomItemTypes.targets | 91 ----------------- src/Common/CopyLocalLockFileAssemblies.props | 12 +-- src/Common/DgmjrSdkDll.props | 5 +- src/Common/EnsureLicense.props | 2 +- src/Common/GlobalUsings.cs | 15 ++- src/Common/GlobalUsings.props | 4 +- src/Common/ItemDefinitionGroups.props | 15 ++- src/Common/PackageTags.props | 7 +- src/Common/ProjectMetadata.props | 2 +- src/Common/SourceLinkPatch.props | 10 +- src/Dgmjr.NET.Sdk.csproj | 98 ++++++++++++++++++ src/DgmjrSdk.Web.csproj | 100 +++++++++++++++++++ src/DgmjrSdk.WebAssembly.csproj | 100 +++++++++++++++++++ src/DgmjrSdk.csproj | 17 ++-- src/Sdk/Common.props | 3 +- src/Sdk/Common.targets | 1 + src/Sdk/Sdk.Web.props | 21 ++++ src/Sdk/Sdk.Web.targets | 20 ++++ src/Sdk/Sdk.WebAssembly.props | 21 ++++ src/Sdk/Sdk.WebAssembly.targets | 20 ++++ src/Sdk/Sdk.props | 1 + src/Sdk/Sdk.targets | 2 +- src/Targets/ACustomItemTypes.targets | 95 ++---------------- src/Targets/PackageIcon.targets | 4 +- src/Targets/PackageReadme.targets | 4 +- src/Targets/PackageTags.targets | 18 ++-- src/Tasks/EnsurePackageIcon.cs | 4 +- 32 files changed, 458 insertions(+), 243 deletions(-) delete mode 100644 src/Build/ACustomItemTypes.targets create mode 100644 src/Dgmjr.NET.Sdk.csproj create mode 100644 src/DgmjrSdk.Web.csproj create mode 100644 src/DgmjrSdk.WebAssembly.csproj create mode 100644 src/Sdk/Sdk.Web.props create mode 100644 src/Sdk/Sdk.Web.targets create mode 100644 src/Sdk/Sdk.WebAssembly.props create mode 100644 src/Sdk/Sdk.WebAssembly.targets diff --git a/.frontmatter/database/mediaDb.json b/.frontmatter/database/mediaDb.json index 9e26dfe..c5e1e7a 100644 --- a/.frontmatter/database/mediaDb.json +++ b/.frontmatter/database/mediaDb.json @@ -1 +1 @@ -{} \ No newline at end of file +{"users":{"justin":{"github":{"bots":{"whatruin2v3bot":{"whatruin2v3bot":{}}}}}}} \ No newline at end of file diff --git a/.github/workflows/pack.yml b/.github/workflows/pack.yml index f642611..26daadb 100644 --- a/.github/workflows/pack.yml +++ b/.github/workflows/pack.yml @@ -23,11 +23,13 @@ jobs: uses: dgmjr-actions/git-checkout@main with: path: Repo + token: ${{ secrets.GITHUB_TOKEN }} - name: Checkout the Packages repository alongside the one being compiled uses: dgmjr-actions/git-checkout@main with: repository: dgmjr-io/Packages path: Packages + token: ${{ secrets.GITHUB_TOKEN }} - name: Run setup-dgmjrsdk uses: dgmjr-actions/setup-dgmjrsdk@main with: diff --git a/Test/Directory.Build.props b/Test/Directory.Build.props index 39e959c..4e3c20f 100644 --- a/Test/Directory.Build.props +++ b/Test/Directory.Build.props @@ -11,5 +11,5 @@ --> - + diff --git a/Test/Directory.Build.targets b/Test/Directory.Build.targets index bd1f7d6..f3a5934 100644 --- a/Test/Directory.Build.targets +++ b/Test/Directory.Build.targets @@ -11,5 +11,5 @@ --> - + diff --git a/src/Build/ACustomItemTypes.props b/src/Build/ACustomItemTypes.props index 2606ef9..e47eb66 100644 --- a/src/Build/ACustomItemTypes.props +++ b/src/Build/ACustomItemTypes.props @@ -36,4 +36,5 @@ None + diff --git a/src/Build/ACustomItemTypes.targets b/src/Build/ACustomItemTypes.targets deleted file mode 100644 index 7f0f624..0000000 --- a/src/Build/ACustomItemTypes.targets +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - diff --git a/src/Common/CopyLocalLockFileAssemblies.props b/src/Common/CopyLocalLockFileAssemblies.props index 3633a90..e130b41 100644 --- a/src/Common/CopyLocalLockFileAssemblies.props +++ b/src/Common/CopyLocalLockFileAssemblies.props @@ -1,17 +1,17 @@ - - false - + + false + diff --git a/src/Common/DgmjrSdkDll.props b/src/Common/DgmjrSdkDll.props index 8452ec5..0ed5f8a 100644 --- a/src/Common/DgmjrSdkDll.props +++ b/src/Common/DgmjrSdkDll.props @@ -1,6 +1,7 @@ - $(MSBuildThisFileDirectory)../bin/DgmjrSdk.dll - $(MSBuildThisFileDirectory)../lib/DgmjrSdk.dll + $(MSBuildProjectName.StartsWith('DgmjrSdk')) + $(MSBuildThisFileDirectory)../bin/DgmjrSdk.dll + $(MSBuildThisFileDirectory)../lib/DgmjrSdk.dll diff --git a/src/Common/EnsureLicense.props b/src/Common/EnsureLicense.props index 2204024..1564797 100644 --- a/src/Common/EnsureLicense.props +++ b/src/Common/EnsureLicense.props @@ -14,7 +14,7 @@ included $(MSBuildThisFileDirectory)/../lib/netstandard2.0/DgmjrSdk.dll - + $(PackDependsOn); EnsureLicenseFileExists diff --git a/src/Common/GlobalUsings.cs b/src/Common/GlobalUsings.cs index ee4a2d7..4acf786 100644 --- a/src/Common/GlobalUsings.cs +++ b/src/Common/GlobalUsings.cs @@ -1,13 +1,10 @@ /* - * DgmjrNamespace.cs - * - * Created: 2023-01-10-10:37:17 - * Modified: 2023-01-10-10:37:17 - * - * Author: David G. Moore, Jr. - * - * Copyright © 2022-2023 David G. Moore, Jr., All Rights Reserved - * License: MIT (https://opensource.org/licenses/MIT) + * GlobalUsings.cs + * Created: 2024-02-10T11:07:06-05:00 + * Modified: 2024-04-24T21:20:28-04:00 + * Author: David G. Moore, Jr. + * Copyright: © 2022 - 2024 David G. Moore, Jr., All Rights Reserved + * License: MIT (https://opensource.org/licenses/MIT) */ #pragma warning disable CD1607 // The file needs documentation headers. diff --git a/src/Common/GlobalUsings.props b/src/Common/GlobalUsings.props index 5fdb289..e162875 100644 --- a/src/Common/GlobalUsings.props +++ b/src/Common/GlobalUsings.props @@ -3,9 +3,9 @@ @(Compile->Count()) > 0 - + - + diff --git a/src/Common/ItemDefinitionGroups.props b/src/Common/ItemDefinitionGroups.props index f449db5..c94b6c8 100755 --- a/src/Common/ItemDefinitionGroups.props +++ b/src/Common/ItemDefinitionGroups.props @@ -1,13 +1,10 @@ @@ -21,7 +18,7 @@ true Compile; Runtime; Build; BuildMultitargeting; BuildTransitive; Native - ContentFiles; Analyzers + ContentFiles; Analyzers; Native diff --git a/src/Common/PackageTags.props b/src/Common/PackageTags.props index cb0ed3e..2ed6f47 100755 --- a/src/Common/PackageTags.props +++ b/src/Common/PackageTags.props @@ -1,11 +1,11 @@ @@ -15,7 +15,6 @@ Imported $(GetPackageMetadataDependsOn); - SetPackageTags diff --git a/src/Common/ProjectMetadata.props b/src/Common/ProjectMetadata.props index 6b4c807..810a7a0 100755 --- a/src/Common/ProjectMetadata.props +++ b/src/Common/ProjectMetadata.props @@ -25,6 +25,6 @@ enable true LatestPatch - Library + Library diff --git a/src/Common/SourceLinkPatch.props b/src/Common/SourceLinkPatch.props index 3c6dc56..67cbe49 100644 --- a/src/Common/SourceLinkPatch.props +++ b/src/Common/SourceLinkPatch.props @@ -1,18 +1,18 @@ - <_MicrosoftSourceLinkCommonAssemblyFile>$(Pkg_Microsoft_SourceLink_Common)/tools/Microsoft.SourceLink.Common.dll - $(Pkg_Microsoft_Build_Tasks_Git)/tools/Microsoft.Build.Tasks.Git.dll + + diff --git a/src/Dgmjr.NET.Sdk.csproj b/src/Dgmjr.NET.Sdk.csproj new file mode 100644 index 0000000..4c88c0e --- /dev/null +++ b/src/Dgmjr.NET.Sdk.csproj @@ -0,0 +1,98 @@ + + + + + netstandard2.0 + EB008C4C-9C3A-4498-A19D-34A42B6E2CE1 + FAE04EC0-301F-11D3-BF4B-00C04F79EFBC + true + true + true + true + false + $(MSBuildThisFileDirectory)lib + + + The DGMJR-IO SDK + The DGMJR-IO SDK is a collection of `.props` and `.targets` files that are used to build and package the DGMJR projects. + + $(MSbuildProjectName) + preview + MSBuildSdk + true + true + true + $(NoWarn);MSB4011 + icon.png + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/DgmjrSdk.Web.csproj b/src/DgmjrSdk.Web.csproj new file mode 100644 index 0000000..1aacd0a --- /dev/null +++ b/src/DgmjrSdk.Web.csproj @@ -0,0 +1,100 @@ + + + + + netstandard2.0 + EB008C4C-9C3A-4498-A19D-34A42B6E2CE1 + FAE04EC0-301F-11D3-BF4B-00C04F79EFBC + true + true + true + true + false + $(MSBuildThisFileDirectory)lib + + + The DGMJR-IO SDK + The DGMJR-IO SDK is a collection of `.props` and `.targets` files that are used to build and package the DGMJR projects. + + $(MSbuildProjectName) + preview + MSBuildSdk + true + true + true + $(NoWarn);MSB4011 + icon.png + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/DgmjrSdk.WebAssembly.csproj b/src/DgmjrSdk.WebAssembly.csproj new file mode 100644 index 0000000..0bdd13a --- /dev/null +++ b/src/DgmjrSdk.WebAssembly.csproj @@ -0,0 +1,100 @@ + + + + + netstandard2.0 + EB008C4C-9C3A-4498-A19D-34A42B6E2CE1 + FAE04EC0-301F-11D3-BF4B-00C04F79EFBC + true + true + true + true + false + $(MSBuildThisFileDirectory)lib + + + The DGMJR-IO SDK + The DGMJR-IO SDK is a collection of `.props` and `.targets` files that are used to build and package the DGMJR projects. + + $(MSbuildProjectName) + preview + MSBuildSdk + true + true + true + $(NoWarn);MSB4011 + icon.png + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/DgmjrSdk.csproj b/src/DgmjrSdk.csproj index 6928812..13dd127 100644 --- a/src/DgmjrSdk.csproj +++ b/src/DgmjrSdk.csproj @@ -1,13 +1,10 @@ @@ -35,7 +32,7 @@ $(NoWarn);MSB4011 icon.png true - 0.0.23 + diff --git a/src/Sdk/Common.props b/src/Sdk/Common.props index b77bb95..fa8613c 100644 --- a/src/Sdk/Common.props +++ b/src/Sdk/Common.props @@ -1,6 +1,6 @@ - $(MSBuildProjectName.Equals('DgmjrSdk')) + $(MSBuildProjectName.StartsWith('DgmjrSdk')) true $(MSBuildThisFileDirectory)../lib/DgmjrSdk.dll @@ -11,6 +11,7 @@ + diff --git a/src/Sdk/Common.targets b/src/Sdk/Common.targets index a390b9c..8aff171 100644 --- a/src/Sdk/Common.targets +++ b/src/Sdk/Common.targets @@ -1,4 +1,5 @@ + diff --git a/src/Sdk/Sdk.Web.props b/src/Sdk/Sdk.Web.props new file mode 100644 index 0000000..dbdc802 --- /dev/null +++ b/src/Sdk/Sdk.Web.props @@ -0,0 +1,21 @@ + + + + + $(MSBuildThisFileDirectory)Sdk.props + !$(UsingMicrosoftNETSdkWeb.Equals("true")) + true + + + + diff --git a/src/Sdk/Sdk.Web.targets b/src/Sdk/Sdk.Web.targets new file mode 100644 index 0000000..d414977 --- /dev/null +++ b/src/Sdk/Sdk.Web.targets @@ -0,0 +1,20 @@ + + + + + $(MSBuildThisFileDirectory)Sdk.targets + + + + + diff --git a/src/Sdk/Sdk.WebAssembly.props b/src/Sdk/Sdk.WebAssembly.props new file mode 100644 index 0000000..d1cb4f5 --- /dev/null +++ b/src/Sdk/Sdk.WebAssembly.props @@ -0,0 +1,21 @@ + + + + + $(MSBuildThisFileDirectory)Sdk.props + !$(UsingMicrosoftNETSdkWebAssembly.Equals("true")) + true + + + + diff --git a/src/Sdk/Sdk.WebAssembly.targets b/src/Sdk/Sdk.WebAssembly.targets new file mode 100644 index 0000000..d414977 --- /dev/null +++ b/src/Sdk/Sdk.WebAssembly.targets @@ -0,0 +1,20 @@ + + + + + $(MSBuildThisFileDirectory)Sdk.targets + + + + + diff --git a/src/Sdk/Sdk.props b/src/Sdk/Sdk.props index 0cfcf66..22a84bf 100644 --- a/src/Sdk/Sdk.props +++ b/src/Sdk/Sdk.props @@ -14,6 +14,7 @@ $(MSBuildThisFileDirectory)Sdk.props !$(UsingMicrosoftNETSdk.Equals("true")) + true diff --git a/src/Sdk/Sdk.targets b/src/Sdk/Sdk.targets index 6587ca5..064ce4c 100644 --- a/src/Sdk/Sdk.targets +++ b/src/Sdk/Sdk.targets @@ -15,6 +15,6 @@ $(MSBuildThisFileDirectory)Sdk.targets - + diff --git a/src/Targets/ACustomItemTypes.targets b/src/Targets/ACustomItemTypes.targets index 6c218de..ce80ebb 100644 --- a/src/Targets/ACustomItemTypes.targets +++ b/src/Targets/ACustomItemTypes.targets @@ -1,91 +1,12 @@ - - - - true - Native;BuildTransitive;BuildMultitargeting;ContentFiles;Compile;Runtime - true - Analyzers;Build - true - All - - - true - Always - Always - true - Analyzer - true - false - Configuration=$(Configuration) - Restore;Build;Pack - - - true - Analyzers;Runtime;Native - true - ContentFiles;Build;BuildTransitive;BuildMultitargeting - true - All - - - true - ContentFiles;Native;Analyzers - true - Build;BuildTransitive;BuildMultitargeting;Runtime;Compile - true - None - + + + + + diff --git a/src/Targets/PackageIcon.targets b/src/Targets/PackageIcon.targets index 784fd3d..44fe274 100644 --- a/src/Targets/PackageIcon.targets +++ b/src/Targets/PackageIcon.targets @@ -13,8 +13,8 @@ - - + + diff --git a/src/Targets/PackageReadme.targets b/src/Targets/PackageReadme.targets index 21a61b4..51cfa0b 100755 --- a/src/Targets/PackageReadme.targets +++ b/src/Targets/PackageReadme.targets @@ -20,9 +20,9 @@ - + - + diff --git a/src/Targets/PackageTags.targets b/src/Targets/PackageTags.targets index 72f426b..75154c0 100755 --- a/src/Targets/PackageTags.targets +++ b/src/Targets/PackageTags.targets @@ -15,10 +15,16 @@ Imported - - - @(PackageTag->Distinct(), ' ') - $(PackageTags.ToLower()) - - + + + + + + + + + + $(@(DistinctPackageTag, ' ')) + $(PackageTags.ToLower()) + diff --git a/src/Tasks/EnsurePackageIcon.cs b/src/Tasks/EnsurePackageIcon.cs index 65289f5..19be5cc 100644 --- a/src/Tasks/EnsurePackageIcon.cs +++ b/src/Tasks/EnsurePackageIcon.cs @@ -12,7 +12,6 @@ namespace Dgmjr.Sdk.Tasks; /// public class EnsurePackageIcon : MSBTask { - /// the "" extension /// .svg protected const string Icon = "icon"; @@ -24,10 +23,13 @@ public class EnsurePackageIcon : MSBTask /// the "" extension /// .svg protected const string _jpg = ".jpg"; + /// the "" extension /// .svg protected const string _svg = ".svg"; + private const string DEFAULT_PACKAGE_ICON_PNG = "DEFAULT_PACKAGE_ICON.png"; + /// /// Supported icon extensions ///