Skip to content

Commit

Permalink
📝 (PackageTags.props): Remove redundant SetPackageTags property in Pa…
Browse files Browse the repository at this point in the history
…ckageTags.props file 🔧 (ACustomItemTypes.targets, PackageTags.targets): Refactor PackageReferences to include only the identity in SourceGeneratorPackageReference, SourceGeneratorProjectReference, SourceCodePackageReference, and UsingsPackageReference

Adding Sdk.Web & Sdk.WebAssembly

Making these files SDK-neutral

Update pack.yml

some changes

Fixing this

Changes
  • Loading branch information
dgmjr committed Jun 10, 2024
1 parent 4a8bbe8 commit db148e8
Show file tree
Hide file tree
Showing 32 changed files with 458 additions and 243 deletions.
2 changes: 1 addition & 1 deletion .frontmatter/database/mediaDb.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{}
{"users":{"justin":{"github":{"bots":{"whatruin2v3bot":{"whatruin2v3bot":{}}}}}}}
2 changes: 2 additions & 0 deletions .github/workflows/pack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion Test/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
-->

<Project>
<!-- <Import Project="Sdk.props" Sdk="DgmjrSdk" /> -->
<Import Project="Sdk.props" Sdk="DgmjrSdk" />
</Project>
2 changes: 1 addition & 1 deletion Test/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
-->

<Project>
<!-- <Import Project="Sdk.targets" Sdk="DgmjrSdk" /> -->
<Import Project="Sdk.targets" Sdk="DgmjrSdk" />
</Project>
1 change: 1 addition & 0 deletions src/Build/ACustomItemTypes.props
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,5 @@
<PrivateAssets>None</PrivateAssets>
</UsingsPackageReference>
</ItemDefinitionGroup>

</Project>
91 changes: 0 additions & 91 deletions src/Build/ACustomItemTypes.targets

This file was deleted.

12 changes: 6 additions & 6 deletions src/Common/CopyLocalLockFileAssemblies.props
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<!--
* CopyLocalLockFileAssemblies.props
*
*
* Created: 2022-11-25-01:40:12
* Modified: 2022-11-25-01:40:12
*
*
* Author: David G. Moore, Jr. <[email protected]>
*
*
* Copyright © 2022-2023 David G. Moore, Jr., All Rights Reserved
* License: MIT (https://opensource.org/licenses/MIT)
-->

<Project>
<PropertyGroup>
<CopyLocalLockFileAssemblies>false</CopyLocalLockFileAssemblies>
</PropertyGroup>
<PropertyGroup>
<CopyLocalLockFileAssemblies>false</CopyLocalLockFileAssemblies>
</PropertyGroup>
</Project>
5 changes: 3 additions & 2 deletions src/Common/DgmjrSdkDll.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project>
<PropertyGroup>
<DgmjrSdkDll Condition="$(IsDgmjrSdk)">$(MSBuildThisFileDirectory)../bin/DgmjrSdk.dll</DgmjrSdkDll>
<DgmjrSdkDll Condition="!$(IsDgmjrSdk)">$(MSBuildThisFileDirectory)../lib/DgmjrSdk.dll</DgmjrSdkDll>
<IsDgmjrSdk>$(MSBuildProjectName.StartsWith('DgmjrSdk'))</IsDgmjrSdk>
<DgmjrSdkDll Condition="$(MSBuildProjectName.StartsWith('DgmjrSdk'))">$(MSBuildThisFileDirectory)../bin/DgmjrSdk.dll</DgmjrSdkDll>
<DgmjrSdkDll Condition="!$(MSBuildProjectName.StartsWith('DgmjrSdk'))">$(MSBuildThisFileDirectory)../lib/DgmjrSdk.dll</DgmjrSdkDll>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion src/Common/EnsureLicense.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<PropertyGroup>
<EnsureLicense_props>included</EnsureLicense_props>
<DgmjrSdkDll>$(MSBuildThisFileDirectory)/../lib/netstandard2.0/DgmjrSdk.dll</DgmjrSdkDll>
<PackDependsOn Condition="'$(MSBuildProjectName)' != 'DgmjrSdk'">
<PackDependsOn Condition="!$(MSBuildProjectName.StartsWith('DgmjrSdk'))">
$(PackDependsOn);
EnsureLicenseFileExists
</PackDependsOn>
Expand Down
15 changes: 6 additions & 9 deletions src/Common/GlobalUsings.cs
Original file line number Diff line number Diff line change
@@ -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. <[email protected]>
*
* 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. <[email protected]>
* 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.
Expand Down
4 changes: 2 additions & 2 deletions src/Common/GlobalUsings.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<IsCompilingFromCode>@(Compile->Count()) &gt; 0</IsCompilingFromCode>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)GlobalUsings.cs" Condition="'$(MSBuildProjectName)' != 'DgmjrSdk' And '$(MSBuildProjectExtension)' == '.csproj'" />
<Compile Include="$(MSBuildThisFileDirectory)GlobalUsings.cs" Condition="!$(MSBuildProjectName.StartsWith('DgmjrSdk')) And '$(MSBuildProjectExtension)' == '.csproj'" />
</ItemGroup>
<ItemGroup Condition="'$(MSBuildProjectName)' != 'Dgmjr.NET.Sdk' And '$(MSBuildProjectExtension)' == '.csproj' And @(Compile->Count()) &gt; 0">
<ItemGroup Condition="!$(MSBuildProjectName.StartsWith('DgmjrSdk')) And '$(MSBuildProjectExtension)' == '.csproj' And @(Compile->Count()) &gt; 0">
<!-- <Using Include="System.Text.Encoding" Static="true" /> -->
<Using Include="System.AppContext" Static="true" />
<Using Include="System.AppDomain" Static="true" />
Expand Down
15 changes: 6 additions & 9 deletions src/Common/ItemDefinitionGroups.props
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
<!--
* ItemDefinitionGroups.props
*
* Created: 2022-10-24-08:10:51
* Modified: 2023-10-12-08:22:44
*
* Author: David G. Moore, Jr. <[email protected]>
*
* Copyright © 2022 - 2023 David G. Moore, Jr., All Rights Reserved
* License: MIT (https://opensource.org/licenses/MIT)
* Created: 2024-02-10T11:07:06-05:00
* Modified: 2024-04-24T21:17:27-04:00
* Author: David G. Moore, Jr. <[email protected]>
* Copyright: © 2022 - 2024 David G. Moore, Jr., All Rights Reserved
* License: MIT (https://opensource.org/licenses/MIT)
-->

<Project>
Expand All @@ -21,7 +18,7 @@
<!-- Generate "PKG_Package_Id" properties, which point to the package's restored location on disk -->
<GeneratePathProperty>true</GeneratePathProperty>
<IncludeAssets>Compile; Runtime; Build; BuildMultitargeting; BuildTransitive; Native</IncludeAssets>
<ExcludeAssets>ContentFiles; Analyzers</ExcludeAssets>
<ExcludeAssets>ContentFiles; Analyzers; Native</ExcludeAssets>
</PackageReference>
</ItemDefinitionGroup>
<ItemDefinitionGroup>
Expand Down
7 changes: 3 additions & 4 deletions src/Common/PackageTags.props
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<!--
* PackageTags.props
*
*
* Created: 2023-06-30-09:41:55
* Modified: 2023-06-30-09:42:38
*
*
* Author: David G. Moore, Jr. <[email protected]>
*
*
* Copyright © 2022 - 2023 David G. Moore, Jr., All Rights Reserved
* License: MIT (https://opensource.org/licenses/MIT)
-->
Expand All @@ -15,7 +15,6 @@
<PackageTags_props>Imported</PackageTags_props>
<GetPackageMetadataDependsOn>
$(GetPackageMetadataDependsOn);
SetPackageTags
</GetPackageMetadataDependsOn>
</PropertyGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Common/ProjectMetadata.props
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@
<ImplicitUsings>enable</ImplicitUsings>
<IsPublishable>true</IsPublishable>
<RollForward>LatestPatch</RollForward>
<OutputType>Library</OutputType>
<OutputType Condition="'$(OutputType)' == ''">Library</OutputType>
</PropertyGroup>
</Project>
10 changes: 5 additions & 5 deletions src/Common/SourceLinkPatch.props
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<!--
* SourceLinkPatch.props
*
*
* Created: 2022-11-24-08:07:21
* Modified: 2022-11-24-08:07:21
*
*
* Author: David G. Moore, Jr. <[email protected]>
*
*
* Copyright © 2022-2023 David G. Moore, Jr., All Rights Reserved
* License: MIT (https://opensource.org/licenses/MIT)
-->

<Project>
<PropertyGroup>
<_MicrosoftSourceLinkCommonAssemblyFile>$(Pkg_Microsoft_SourceLink_Common)/tools/Microsoft.SourceLink.Common.dll</_MicrosoftSourceLinkCommonAssemblyFile>
<MicrosoftBuildTasksGitAssemblyFile>$(Pkg_Microsoft_Build_Tasks_Git)/tools/Microsoft.Build.Tasks.Git.dll</MicrosoftBuildTasksGitAssemblyFile>
<!-- <_MicrosoftSourceLinkCommonAssemblyFile>$(Pkg_Microsoft_SourceLink_Common)/tools/Microsoft.SourceLink.Common.dll</_MicrosoftSourceLinkCommonAssemblyFile> -->
<!-- <MicrosoftBuildTasksGitAssemblyFile>$(Pkg_Microsoft_Build_Tasks_Git)/tools/Microsoft.Build.Tasks.Git.dll</MicrosoftBuildTasksGitAssemblyFile> -->
</PropertyGroup>
</Project>
98 changes: 98 additions & 0 deletions src/Dgmjr.NET.Sdk.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<!--
* Dgmjr.NET.Sdk.csproj
* Created: 2024-04-30T19:48:21-04:00
* Modified: 2024-04-30T19:56:07-04:00
* Author: David G. Moore, Jr. <[email protected]>
* Copyright: © 2022 - 2024 David G. Moore, Jr., All Rights Reserved
* License: MIT (https://opensource.org/licenses/MIT)
-->

<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<ProjectGuid>EB008C4C-9C3A-4498-A19D-34A42B6E2CE1</ProjectGuid>
<ProjectTypeGuid>FAE04EC0-301F-11D3-BF4B-00C04F79EFBC</ProjectTypeGuid>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<IsNuGetized>true</IsNuGetized>
<IsPackable>true</IsPackable>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<OutputPath>$(MSBuildThisFileDirectory)lib</OutputPath>
</PropertyGroup>
<PropertyGroup>
<Title>The DGMJR-IO SDK</Title>
<Description>The DGMJR-IO SDK is a collection of `.props` and `.targets` files that are used to build and package the DGMJR projects.</Description>
<!-- <TargetFrameworks>netstandard1.0;netstandard2.0;netstandard2.1;netcoreapp3.1;net6.0;net7.0;net8.0</TargetFrameworks> -->
<PackageId>$(MSbuildProjectName)</PackageId>
<LangVersion>preview</LangVersion>
<PackageType>MSBuildSdk</PackageType>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<IncludeInSolutionFile>true</IncludeInSolutionFile>
<DevelopmentDependency>true</DevelopmentDependency>
<NoWarn>$(NoWarn);MSB4011</NoWarn>
<PackageIcon>icon.png</PackageIcon>
<IsUsingNETSDK>true</IsUsingNETSDK>
<!-- <PackageVersionOverride Condition="'$(PackageVersionOverride)' == '' And '$(Configuration)' != 'Local'">0.0.23</PackageVersionOverride> -->
</PropertyGroup>
<ItemGroup>
<PackageFile Include="./Assets/*" PackagePath="Assets/%(Filename)%(Extension)" />
<PackageFile Include="./Common/*.cs" PackagePath="Common/%(Filename)%(Extension)" />
<!-- <PackageFile Include="./Build/*.props" PackagePath="Build/%(Filename)%(Extension)" />
<PackageFile Include="./Build/*.targets" PackagePath="Build/%(Filename)%(Extension)" />
<PackageFile Include="./Build/Custom/*.*" PackagePath="Build/Custom/%(Filename)%(Extension)" />
<PackageFile Include="./BuildMultiTargeting/*" PackagePath="BuildMultiTargeting/%(Filename)%(Extension)" /> -->
<PackageFile Include="./Common/*.props" PackagePath="Common/%(Filename)%(Extension)" />
<PackageFile Include="./Targets/*.targets" PackagePath="Targets/%(Filename)%(Extension)" />
<!-- <PackageFile Include="./Build/Custom/*.*" PackagePath="Build/Custom/%(Filename)%(Extension)" /> -->
<!-- <PackageFile Include="./BuildMultiTargeting/*" PackagePath="BuildMultiTargeting/%(Filename)%(Extension)" /> -->
<PackageFile Include="./LICENSE.md" PackagePath="%(Filename)%(Extension)" />
<PackageFile Include="./Scripts/*" PackagePath="Scripts/%(Filename)%(Extension)" />
<PackageFile Include="./Sdk/*" PackagePath="Sdk/%(Filename)%(Extension)" />
<PackageFile Include="./lib/*.dll" PackagePath="lib/%(Filename)%(Extension)" />
<PackageFile Include="./lib/*.dll" Pack="true" PackagePath="lib/$(TargetFramework)/%(Filename)%(Extension)" />
<PackageFile Include="./lib/**/*.dll" Pack="true" PackagePath="lib/netstandard2.0/%(Filename)%(Extension)" />
</ItemGroup>
<Target Name="PrepareGitConstants" />
<Target Name="GitInfo" />
<ItemGroup>
<PackageTag Include="sdk" Visible="false" />
<PackageTag Include="build-defaults" Visible="false" />
<PackageTag Include="dgmjrsdk" Visible="false" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="./LICENSE.md" LogicalName="%(Filename)%(Extension)" />
<EmbeddedResource Include="./README_TEMPLATE.md" LogicalName="%(Filename)%(Extension)" />
<EmbeddedResource Include="./frontmatter_template.yml" LogicalName="%(Filename)%(Extension)" />
<EmbeddedResource Include="./Assets/icon.png" LogicalName="DEFAULT_PACKAGE_ICON.png" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="YamlDotNet" />
<PackageReference Include="MSBuild.Usings" IncludeAssets="Build;BuildTransitive;BuildMultitargeting;Runtime;Compile" ExcludeAssets="ContentFiles;Native;Analyzers" PrivateAssets="None" />
</ItemGroup>
<ItemGroup>
</ItemGroup>
<ItemGroup>
<Using Include="System.Collections.Generic.IDictionary&lt;string,string&gt;" Alias="IStringDictionary" />
<Using Include="System.Collections.Generic.Dictionary&lt;string,string&gt;" Alias="StringDictionary" />
<Using Include="System.Collections.Generic.KeyValuePair&lt;string,string&gt;" Alias="StrKvp" />
<Using Include="Dgmjr.Sdk.Models" />
<Using Include="System.Text.RegularExpressions" />
<Using Include="System.String" Static="true" />
<Using Include="System.IO.File" Static="true" />
<Using Include="System.IO.Path" Static="true" />
<Using Include="Microsoft.Build.Framework" />
<Using Include="Microsoft.Build.Execution" />
<Using Include="System.Runtime.CompilerServices" />
<Using Include="System.Reflection" />
<Using Include="System.Diagnostics" />
<Using Include="System.Text.RegularExpressions" />
<Using Include="System.String" Static="true" />
<Using Include="System.IO.File" Static="true" />
<Using Include="System.IO.Path" Static="true" />
<Using Include="Microsoft.Build.Framework" />
<Using Include="Microsoft.Build.Execution" />
<Using Include="System.Runtime.CompilerServices" />
<Using Include="System.Reflection" />
<Using Include="System.Diagnostics" />
</ItemGroup>
</Project>
Loading

0 comments on commit db148e8

Please sign in to comment.