Skip to content

Commit

Permalink
feat: Created project (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
samtrion authored Nov 18, 2024
1 parent 38d11d0 commit 7af3806
Show file tree
Hide file tree
Showing 13 changed files with 133 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ jobs:
name: Build & Tests
uses: dailydevops/pipelines/.github/workflows/cicd-dotnet.yml@0.12.34
with:
disablePublish: true
dotnet-logging: ${{ inputs.dotnet-logging }}
dotnet-version: ${{ vars.NE_DOTNET_TARGETFRAMEWORKS }}
enableSonarQube: true
solution: ./Defaults.sln
secrets: inherit
22 changes: 22 additions & 0 deletions Defaults.sln
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
update-solution.ps1 = update-solution.ps1
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{4AD0D117-4F9D-4288-B0F9-D8C1C120B5E4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetEvolve.Defaults", "src\NetEvolve.Defaults\NetEvolve.Defaults.csproj", "{C9525AC4-A52E-4D52-A9A4-389D9FF6A1CE}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{DB9397A5-7522-4CF5-B402-E4FFC93E600B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetEvolve.Defaults.Tests.Integration", "tests\NetEvolve.Defaults.Tests.Integration\NetEvolve.Defaults.Tests.Integration.csproj", "{7A7B8583-0494-496B-A63F-C0134194D633}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -31,4 +39,18 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C9525AC4-A52E-4D52-A9A4-389D9FF6A1CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C9525AC4-A52E-4D52-A9A4-389D9FF6A1CE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C9525AC4-A52E-4D52-A9A4-389D9FF6A1CE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C9525AC4-A52E-4D52-A9A4-389D9FF6A1CE}.Release|Any CPU.Build.0 = Release|Any CPU
{7A7B8583-0494-496B-A63F-C0134194D633}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7A7B8583-0494-496B-A63F-C0134194D633}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7A7B8583-0494-496B-A63F-C0134194D633}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7A7B8583-0494-496B-A63F-C0134194D633}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{C9525AC4-A52E-4D52-A9A4-389D9FF6A1CE} = {4AD0D117-4F9D-4288-B0F9-D8C1C120B5E4}
{7A7B8583-0494-496B-A63F-C0134194D633} = {DB9397A5-7522-4CF5-B402-E4FFC93E600B}
EndGlobalSection
EndGlobal
1 change: 1 addition & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<Description>Source Only package, which provides the standard configurations and settings for the NetEvolve projects. Such as `.editorconfig`, build props and targets.</Description>
<RepositoryUrl>https://github.com/dailydevops/defaults.git</RepositoryUrl>
<PackageProjectUrl>https://github.com/dailydevops/defaults</PackageProjectUrl>
<PackageReleaseNotes>$(PackageProjectUrl)/releases</PackageReleaseNotes>
<PackageTags>editorconfig;configuration;settings;props;targets</PackageTags>
<CopyrightYearStart>2024</CopyrightYearStart>
</PropertyGroup>
Expand Down
29 changes: 19 additions & 10 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,18 +1,27 @@
<Project>

<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
</PropertyGroup>

<ItemGroup>
<GlobalPackageReference Include="CSharpier.MSBuild" Version="0.29.2" />
<GlobalPackageReference Include="GitVersion.MsBuild" Version="6.0.3" />
<GlobalPackageReference Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" Version="3.3.4" />
<GlobalPackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0" />
<GlobalPackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
<GlobalPackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.11.20" />
<GlobalPackageReference Include="SonarAnalyzer.CSharp" Version="9.32.0.97167" Condition=" '$(BuildingInsideVisualStudio)' == 'true' " />
<PackageVersion Include="coverlet.collector" Version="6.0.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageVersion>
<PackageVersion Include="coverlet.msbuild" Version="6.0.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageVersion>
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageVersion Include="NetEvolve.Extensions.XUnit" Version="2.3.1" />
<PackageVersion Include="xunit" Version="2.9.2" />
<PackageVersion Include="xunit.analyzers" Version="1.17.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageVersion>
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageVersion>
</ItemGroup>

</Project>
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
# template-dotnet
.NET template for repositories
# NetEvolve.Defaults

This is the NetEvolve.Defaults package, which provides the standard configurations and settings for the NetEvolve projects. Such as `.editorconfig`, build props and targets.
All of our projects are build on top of this package, so we can have a consistent build process and settings across all of our projects.

## Installation
To install this package, you can use the following command:
```bash
dotnet add package NetEvolve.Defaults
```
19 changes: 19 additions & 0 deletions src/NetEvolve.Defaults/NetEvolve.Defaults.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>$(NetEvolve_ProjectTargetFrameworks)</TargetFramework>

<IncludeBuildOutput>false</IncludeBuildOutput>
<IsPackable>true</IsPackable>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<IncludeSymbols>false</IncludeSymbols>
<NoWarn>$(NoWarn);NU5128;</NoWarn>
</PropertyGroup>

<ItemGroup>
<None Include="build\**" Pack="true" PackagePath="build\" />
<None Include="buildMultiTargeting\**" Pack="true" PackagePath="buildMultiTargeting\" IncludeInPackage="true" />
<None Include="buildTransitive\**" Pack="true" PackagePath="buildTransitive\" />
</ItemGroup>

</Project>
10 changes: 10 additions & 0 deletions src/NetEvolve.Defaults/build/NetEvolve.Defaults.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Project>

<PropertyGroup Label="NuGet Audit">
<NuGetAudit Condition="'$(NuGetAudit)' == ''">true</NuGetAudit>
<NuGetAuditMode Condition="'$(NuGetAuditMode)' == ''">all</NuGetAuditMode>
<NuGetAuditLevel Condition="'$(NuGetAuditLevel)' == ''">low</NuGetAuditLevel>
<WarningsAsErrors Condition="$(ContinuousIntegrationBuild) == 'true' OR '$(Configuration)' == 'Release'">(WarningsAsErrors);NU1900;NU1901;NU1902;NU1903;NU1904</WarningsAsErrors>
</PropertyGroup>

</Project>
2 changes: 2 additions & 0 deletions src/NetEvolve.Defaults/build/NetEvolve.Defaults.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<Project>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<Project>
<Import Project="$(MSBuildThisFileDirectory)\..\build\NetEvolve.Defaults.props" />
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<Project>
<Import Project="$(MSBuildThisFileDirectory)\..\build\NetEvolve.Defaults.targets" />
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<Project>
<Import Project="$(MSBuildThisFileDirectory)\..\build\NetEvolve.Defaults.props" />
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<Project>
<Import Project="$(MSBuildThisFileDirectory)\..\build\NetEvolve.Defaults.targets" />
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>$(NetEvolve_TestTargetFrameworks)</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.msbuild">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="NetEvolve.Extensions.XUnit" />
<PackageReference Include="xunit" />
<PackageReference Include="xunit.analyzers">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="xunit.runner.visualstudio">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\NetEvolve.Defaults\NetEvolve.Defaults.csproj" />
</ItemGroup>

<ItemGroup>
<AssemblyAttribute Include="NetEvolve.Extensions.XUnit.IntegrationTestAttribute" />
</ItemGroup>

</Project>

0 comments on commit 7af3806

Please sign in to comment.