-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Get rid of the shit that broke everything
- Loading branch information
Showing
17 changed files
with
280 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
authors: | ||
- dgmjr | ||
title: README.md | ||
lastmod: 2024-11-25T12:11:10-05:00 | ||
date: 2024-11-25T12:11:10-05:00 | ||
license: MIT | ||
copyright: © 2022 - 2024 David G. Moore, Jr., All Rights Reserved | ||
keywords: | ||
- dgmjr | ||
type: readme | ||
--- | ||
|
||
# Dgmjr.Build.NoTargets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
--- | ||
title: DGMJR-IO SDK | ||
authors: | ||
- dgmjr | ||
type: readme | ||
slug: dgmjr-io-sdk | ||
project: shared | ||
description: The DGMJR-IO SDK is a collection of `.props` and `.targets` files that are used to build and package the DGMJR projects. It sets a whole boatload of default values and does a shit ton of stuff automagically. | ||
version: 0.0.1-Local | ||
lastmod: 2023-07-14T07:49:58.705Z | ||
date: 2023-07-14T07:49:16.139Z | ||
license: MIT | ||
keywords: | ||
- dotnet | ||
- sdk | ||
- dgmjrsdk | ||
- defaults | ||
- default-values | ||
--- | ||
|
||
# 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. It sets a whole boatload of default values and does a shit ton of stuff automagically. | ||
|
||
# Getting Started | ||
|
||
Put the following code in your `Directory.Build.props` file: | ||
|
||
```xml | ||
<Include Sdk="DgmjrSdk" File="Sdk.props" /> | ||
``` | ||
|
||
And put the following code in your `Directory.Build.targets` file: | ||
|
||
```xml | ||
<Include Sdk="DgmjrSdk" File="Sdk.targets" /> | ||
``` | ||
|
||
And make sure to add the following to your `global.json` file: | ||
|
||
```json | ||
"msbuild-sdks":{ | ||
"DgmjrSdk": "0.0.1" // (or the current package version) | ||
} | ||
``` | ||
|
||
Then compile and run your project and it will have all the DGMJR-IO SDK defaults. These include the following: | ||
|
||
## Item Definitions | ||
|
||
* `Author` - with `Initials` and `Email` metadata, which populate the `Authors` property of the MSBuild (and NuGet) project | ||
* `Owner` - with `Initials` and `Email` metadata, which populate the `Owners` and `Copyright` properties of the MSBuild (and NuGet) project | ||
* `PackageTag` - which concatenates all instances of it and populates the `PackageTags` property of the MSBuild (and NuGet) project | ||
* `SourceCodeReference`, which behaves just like a `PackageReference` except it just pulls the `ContentFiles` and `Build` assets from the package | ||
* `SourceGenerator`, which behaves just like a `PackageReference` except it just pulls the `Analyzers` and `Build` assets from the package | ||
* `NoWarn`, which adds all instances to the `NoWarn` property | ||
|
||
## Targets | ||
|
||
* [`EnsurePackageReadme`](https://github.com/dgmjr-io/DgmjrSdk/blob/main/src/Build/PackageReadme.targets), which ensures the package contains a `README.md` file at the root; if not, it generates one from the `Title` and `Description` properties and embeds it into the NuGet package | ||
* [`EnsurePackageIcon`](https://github.com/dgmjr-io/DgmjrSdk/blob/main/src/Build/PackageIcon.targets), which ensures the package contains an icon file; if theres no file named `Icon.(png/jpg/jpeg)` at the root, it will use a [default icon](https://github.com/dgmjr-io/DgmjrSdk/blob/main/src/Assets/Icon.png) | ||
* [`RemoveDuplicateUsings`](https://github.com/dgmjr-io/DgmjrSdk/blob/main/src/Build/RemoveDuplicateUsings.targets), which removes any duplicate `Using` items from the project | ||
* [`RemoveDuplicatePackageReferences`](https://github.com/dgmjr-io/DgmjrSdk/blob/main/src/Build/RemoveDuplicatePackageReferences.targets), which removes any duplicate `Using` items from the project | ||
* [`PackageProjectName.targets`](https://github.com/dgmjr-io/DgmjrSdk/blob/main/src/Build/PackageProjectName.targets) - a file that packages any file in the root directory named `[MSBuildProjectName].targets` into the `build` folder of the NuGet package | ||
* [`PackageProjectName.props`](https://github.com/dgmjr-io/DgmjrSdk/blob/main/src/Build/PackageProjectName.targets) - a file that packages any file in the root directory named `[MSBuildProjectName].props` into the `build` folder of the NuGet package | ||
|
||
## Properties | ||
|
||
* [`PackageVersionOverride`](https://github.com/dgmjr-io/DgmjrSdk/blob/main/src/Build/PackageVersionOverride.props), which allows you to override the package version calculated by `MinVer` | ||
* A default `UserSecrets` property | ||
* Default `AssetTargetFallback`s for all .NET versions from .NETStandard 2.0 through .NET 8.0 | ||
* Default values for generating XML documentation as well as pulling the XML docs from referenced packages | ||
* All `Include[Whatever]OutputGroup` properties set to `true` | ||
* [`JustInTimeVersioning`](https://github.com/dgmjr-io/JustInTimeVersioning) enabled | ||
* [`NuGetPush`](https://github.com/dgmjr-io/NuGetPush) enabled | ||
|
||
# Miscellaneous | ||
|
||
* Assembly signing - ensures the assembly is signed by a key called [`dgmjr.snk`](https://github.com/dgmjr-io/DgmjrSdk/blob/main/src/Assets/dgmjr.snk) located in the [`Assets`](https://github.com/dgmjr-io/DgmjrSdk/blob/main/src/Assets) folder. There's also [`dgmjr.pub`](https://github.com/dgmjr-io/DgmjrSdk/blob/main/src/Assets/dgmjr.pub) (the binary version of the public key) and [`dgmjr.pub.asc`](https://github.com/dgmjr-io/DgmjrSdk/blob/main/src/Assets/dgmjr.pub.asc), which contains the plain text public key and token. | ||
* [`TestingLocal`](https://github.com/dgmjr-io/DgmjrSdk/blob/main/src/Build/TestingLocal.targets) - Overrides the `AssemblyVersion` attribute to always be `0.0.1-Local` when the `Configuration` is set to `Local` | ||
* [`Icon.png`](https://github.com/dgmjr-io/DgmjrSdk/blob/main/src/Assets/Icon.png), a default icon file, which will be applied to any package that doesn't have one. | ||
* [`NuGetizer`](https://github.com/devlooped/nugetizer) enabled by default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
--- | ||
# ${title} | ||
|
||
${description} | ||
|
||
<!-- TODO: Write the rest of this file! --> |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Mono StrongName - version 6.12.0.182 | ||
StrongName utility for signing assemblies | ||
Copyright 2002, 2003 Motus Technologies. Copyright 2004-2008 Novell. BSD licensed. | ||
|
||
Public Key: | ||
00240000048000009400000006020000002400005253413100040000010001000d802c8a5e6d2d | ||
2a7487bf92dd89a0689f004d27d8eaef54cc62aed0afd643dc33222f020003d3fc79c76c0a791e | ||
b7ae56d0d17bac639122f17a8f7f246ae6481045146327ebc0eab8878dbdc79aa6ad1bc26b56bb | ||
e0ce5eb443c7450a3496d8bc181135c01b98e974ef825ea9b247bd4bc95023b9394e7073e278cd | ||
e1ca0c94 | ||
|
||
Public Key Token: 44326fa453475ade |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# | ||
# frontmatter_template.yml | ||
# Created: 2024-06-25T18:02:42-04:00 | ||
# Modified: 2024-06-25T18:02:42-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) | ||
# | ||
|
||
--- | ||
authors: | ||
- authors | ||
description: description | ||
keywords: keywords | ||
license: license | ||
slug: slug | ||
tags: targ | ||
title: title | ||
type: readme | ||
version: version | ||
--- |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
<!-- | ||
* Dgmjr.NET.Sdk.Tasks.csproj | ||
* Created: 2024-11-27T02:20:59-05:00 | ||
* Modified: 2024-11-27T02:20:59-05: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="./Common/*.props" PackagePath="Common/%(Filename)%(Extension)" /> | ||
<PackageFile Include="./Targets/*.targets" PackagePath="Targets/%(Filename)%(Extension)" /> | ||
<PackageFile Include="./LICENSE.md" PackagePath="%(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="./Assets/README_TEMPLATE.md" LogicalName="%(Filename)%(Extension)" /> | ||
<EmbeddedResource Include="./Assets/frontmatter_template.yml" LogicalName="%(Filename)%(Extension)" /> | ||
<EmbeddedResource Include="./Assets/icon.png" LogicalName="DEFAULT_PACKAGE_ICON.png" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<PackageReference Include="YamlDotNet" /> | ||
<UsingsPackageReference Include="MSBuild.Usings" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<!-- <Using Include="System.Collections.Generic.IDictionary<string,string>" Alias="IStringDictionary" /> | ||
<Using Include="System.Collections.Generic.Dictionary<string,string>" Alias="StringDictionary" /> | ||
<Using Include="System.Collections.Generic.KeyValuePair<string,string>" 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" /> | ||
</ItemGroup> | ||
<PropertyGroup> | ||
<PushLocalIsEnabled>true</PushLocalIsEnabled> | ||
<PushFaGetIsEnabled>true</PushFaGetIsEnabled> | ||
</PropertyGroup> | ||
</Project> |
2 changes: 1 addition & 1 deletion
2
...oTargets/Tasks/EnsureLicenseFileExists.cs → ....NET.Sdk.Tasks/EnsureLicenseFileExists.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...uild.NoTargets/Tasks/EnsurePackageIcon.cs → Dgmjr.NET.Sdk.Tasks/EnsurePackageIcon.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
title: MIT License | ||
description: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files..yadda, yadda, yadda... | ||
keywords: | ||
- license | ||
- mit | ||
- IP | ||
- copyright | ||
lastmod: 2023-08-29T17:14:54.338Z | ||
date: 2023-07-13T05:44:46.048Z | ||
license: MIT | ||
type: license | ||
slug: mit-license | ||
--- | ||
|
||
# MIT License | ||
|
||
Copyright (c) 2022-2023 [David G. Moore, Jr.](mailto:[email protected] "Send David an email") ([@dgmjr](https://github.com/dgmjr "Contact david on GitHub")), All Rights Reserved | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.