Skip to content

Commit

Permalink
split Directory.Build.props
Browse files Browse the repository at this point in the history
  • Loading branch information
phmatray committed Feb 27, 2024
1 parent 8a5eede commit 70b2c11
Show file tree
Hide file tree
Showing 17 changed files with 234 additions and 194 deletions.
3 changes: 2 additions & 1 deletion MasterCommander.sln.DotSettings.user
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/Environment/Highlighting/HighlightingSourceSnapshotLocation/@EntryValue">/Users/phmatray/Library/Caches/JetBrains/Rider2023.3/resharper-host/temp/Rider/vAny/CoverageData/_MasterCommander.1386933053/Snapshot/snapshot.utdcvr</s:String>



Expand All @@ -9,4 +10,4 @@



</wpf:ResourceDictionary>
</wpf:ResourceDictionary>
20 changes: 20 additions & 0 deletions msbuild/props/CodeAnalysis.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<Project>
<!-- Code Analysis -->
<PropertyGroup>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<AnalysisLevel>8.0-recommended</AnalysisLevel>
<AnalysisModeDesign>All</AnalysisModeDesign>
<AnalysisModeDocumentation>All</AnalysisModeDocumentation>
<AnalysisModeGlobalization>All</AnalysisModeGlobalization>
<AnalysisModeInteroperability>All</AnalysisModeInteroperability>
<AnalysisModeMaintainability>All</AnalysisModeMaintainability>
<AnalysisModeNaming>All</AnalysisModeNaming>
<AnalysisModePerformance>All</AnalysisModePerformance>
<AnalysisModeSingleFile>All</AnalysisModeSingleFile>
<AnalysisModeReliability>All</AnalysisModeReliability>
<AnalysisModeSecurity>All</AnalysisModeSecurity>
<AnalysisModeStyle>All</AnalysisModeStyle>
<AnalysisModeUsage>All</AnalysisModeUsage>
</PropertyGroup>
</Project>
6 changes: 6 additions & 0 deletions msbuild/props/ContinuousIntegration.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<Project>
<!-- Continuous Integration -->
<PropertyGroup Label="Deterministic Build">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>
</Project>
113 changes: 113 additions & 0 deletions msbuild/props/Dependencies.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
<Project>
<!-- Dependencies custom properties -->
<PropertyGroup>
<IsTestProject Condition="'$(IsTestProject)' == ''">false</IsTestProject>
<IsConsoleProject Condition="'$(IsConsoleProject)' == ''">false</IsConsoleProject>
<IncludeAnalyzers Condition="'$(IncludeAnalyzers)' == ''">true</IncludeAnalyzers>
<IncludeDocumentation Condition="'$(IncludeDocumentation)' == ''">false</IncludeDocumentation>
<IncludeReactiveExtensions Condition="'$(IncludeReactiveExtensions)' == ''">false</IncludeReactiveExtensions>
</PropertyGroup>

<!-- Central Package Version Management -->
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<!-- Indicate to NuGet that Directory.Packages.props isn't being used since this repo is using Directory.Build.props instead -->
<CentralPackageVersionsFileImported>true</CentralPackageVersionsFileImported>
</PropertyGroup>

<!-- Package Version Management -->
<ItemGroup>
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" />
<PackageVersion Include="CliWrap" Version="3.6.6" />
<PackageVersion Include="Vogen" Version="3.0.24" />
<PackageVersion Include="Microsoft.CodeCoverage" Version="17.8.0" />
</ItemGroup>

<!-- Conditional Package Versions for Spectre.Console -->
<ItemGroup Condition="'$(IncludeSpectreConsole)' == 'true'">
<PackageVersion Include="Spectre.Console" Version="0.48.0" />
<PackageReference Include="Spectre.Console" />

<PackageVersion Include="Spectre.Console.Cli" Version="0.48.0" />
<PackageReference Include="Spectre.Console.Cli" />

<PackageVersion Include="Spectre.Console.Analyzer" Version="0.48.0" />
<PackageReference Include="Spectre.Console.Analyzer" PrivateAssets="all" />
</ItemGroup>

<!-- Conditional Package Versions for Analyzers -->
<ItemGroup Condition="'$(IncludeAnalyzers)' == 'true'">
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.8.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" PrivateAssets="all" />

<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4" />
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" PrivateAssets="all" />

<PackageVersion Include="StyleCop.Analyzers" Version="1.2.0-beta.556" />
<PackageReference Include="StyleCop.Analyzers" PrivateAssets="all" />

<PackageVersion Include="Roslynator.Analyzers" Version="4.11.0" />
<PackageReference Include="Roslynator.Analyzers" PrivateAssets="all" />
</ItemGroup>

<!-- Conditional Package Versions for Documentation -->
<ItemGroup Condition="'$(IncludeDocumentation)' == 'true'">
<PackageVersion Include="DefaultDocumentation" Version="0.8.2" />
<PackageReference Include="DefaultDocumentation" PrivateAssets="all" />
</ItemGroup>

<!-- Conditional Package Versions for Reactive Extensions -->
<ItemGroup Condition="'$(IncludeReactiveExtensions)' == 'true'">
<PackageVersion Include="System.Reactive" Version="6.0.0" />
<PackageReference Include="System.Reactive" />

<PackageVersion Include="System.Reactive.Linq" Version="6.0.0" />
<PackageReference Include="System.Reactive.Linq" />
</ItemGroup>

<!-- Universal Development Dependencies -->
<!-- These dependencies are used in both production and test projects -->
<ItemGroup>
<PackageVersion Include="FluentValidation" Version="11.9.0" />
<PackageReference Include="FluentValidation" />

<PackageVersion Include="DotNet.ReproducibleBuilds" Version="1.1.1" />
<PackageReference Include="DotNet.ReproducibleBuilds" PrivateAssets="all"/>

<PackageVersion Include="MinVer" Version="4.3.0" />
<PackageReference Include="MinVer" PrivateAssets="all"/>
</ItemGroup>

<!-- Library-Specific Dependencies -->
<!-- These dependencies are only used in production projects -->
<ItemGroup Condition="'$(IsTestProject)' != 'true'">
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
</ItemGroup>

<!-- Test-Specific Dependencies -->
<!-- These dependencies are only used in test projects -->
<ItemGroup Condition="'$(IsTestProject)' == 'true'">
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />

<PackageVersion Include="coverlet.collector" Version="6.0.1" />
<PackageReference Include="coverlet.collector" PrivateAssets="all" />

<PackageVersion Include="xunit" Version="2.7.0" />
<PackageReference Include="xunit" />

<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.7" />
<PackageReference Include="xunit.runner.visualstudio" PrivateAssets="all" />

<PackageVersion Include="Snapshooter.Xunit" Version="0.14.1" />
<PackageReference Include="Snapshooter.Xunit" />

<PackageVersion Include="Verify.XUnit" Version="23.2.2" />
<PackageReference Include="Verify.XUnit" />

<PackageVersion Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="FluentAssertions" />
</ItemGroup>
</Project>
15 changes: 15 additions & 0 deletions msbuild/props/Documentation.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<Project>
<!-- Documentation -->
<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<DefaultDocumentationFolder>../../../docs/master-commander</DefaultDocumentationFolder>
<DefaultDocumentationLinksOutputFile>../../../docs/links</DefaultDocumentationLinksOutputFile>
<DefaultDocumentationAssemblyPageName>MasterCommander</DefaultDocumentationAssemblyPageName>
<DefaultDocumentationFileNameFactory>Name</DefaultDocumentationFileNameFactory>
<DefaultDocumentationGeneratedPages>Assembly,Types,Members</DefaultDocumentationGeneratedPages>
<DefaultDocumentationNamespaceDocItem>
<DefaultDocumentationSections>Title|summary|TableOfContents</DefaultDocumentationSections>
<Markdown.TableOfContentsModes>IncludeKind,IncludeSummary</Markdown.TableOfContentsModes>
</DefaultDocumentationNamespaceDocItem>
</PropertyGroup>
</Project>
9 changes: 9 additions & 0 deletions msbuild/props/FileInclusion.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project>
<!-- File inclusion -->
<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)/../../logo.png" Pack="true" PackagePath="\" Link="Properties/logo.png" />
<None Include="$(MSBuildThisFileDirectory)/../../LICENSE" Pack="true" PackagePath="\" Link="Properties/LICENSE" />
<None Include="$(MSBuildThisFileDirectory)/../../README.md" Pack="true" PackagePath="\" Link="Properties/README.md" />
<AdditionalFiles Include="$(MSBuildThisFileDirectory)/../../stylecop.json" Link="Properties/stylecop.json" />
</ItemGroup>
</Project>
12 changes: 12 additions & 0 deletions msbuild/props/General.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<Project>
<!-- General -->
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<LangVersion>latest</LangVersion>
<IsTestProject>$(MSBuildProjectName.Contains('Tests'))</IsTestProject>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<DebugSymbols>true</DebugSymbols>
<DebugType>embedded</DebugType>
</PropertyGroup>
</Project>
24 changes: 24 additions & 0 deletions msbuild/props/Packaging.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<Project>
<!-- Packaging -->
<PropertyGroup Label="Package Information">
<EnablePackageValidation>true</EnablePackageValidation>
<!--<PackageValidationBaselineVersion>1.0.0</PackageValidationBaselineVersion>-->

<Description>
MasterCommander is a versatile command-line utility designed to streamline the workflow for developers working
with multiple technology stacks. By integrating common operations for Git, .NET, Docker, and npm into a single
application, MasterCommander enhances productivity and simplifies project setup and management tasks.
</Description>
<Authors>Philippe Matray</Authors>
<Copyright>Philippe Matray</Copyright>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/phmatray/MasterCommander</RepositoryUrl>
<PackageProjectUrl>https://github.com/phmatray/MasterCommander</PackageProjectUrl>
<PackageReleaseNotes>https://github.com/phmatray/MasterCommander/releases</PackageReleaseNotes>
<PackageLicenseExpression>GPL-3.0-or-later</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageIcon>logo.png</PackageIcon>
<PackageTags>git, docker, cli, npm, devops utility, library, tool, dotnet, project-management, developers, workflow-automation</PackageTags>
</PropertyGroup>
</Project>
7 changes: 7 additions & 0 deletions msbuild/props/SourceLink.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project>
<!-- Source Link -->
<PropertyGroup Label="Source Link">
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
</PropertyGroup>
</Project>
12 changes: 12 additions & 0 deletions msbuild/props/Versioning.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<Project>
<!-- MinVer Configuration -->
<PropertyGroup>
<!-- Set the minimum version to be used if no Git tags are found -->
<MinVerMinimumMajorMinor>1.0</MinVerMinimumMajorMinor>
<MinVerSkip Condition="'$(Configuration)' == 'Debug'">true</MinVerSkip>
<MinVerTagPrefix>v</MinVerTagPrefix>
<MinVerAutoIncrement>patch</MinVerAutoIncrement>
<MinVerDefaultPreReleaseIdentifiers>alpha</MinVerDefaultPreReleaseIdentifiers>
<MinVerIgnoreHeight>true</MinVerIgnoreHeight>
</PropertyGroup>
</Project>
134 changes: 9 additions & 125 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,127 +1,11 @@
<Project>
<!-- General -->
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<LangVersion>latest</LangVersion>
<IsTestProject>$(MSBuildProjectName.Contains('Tests'))</IsTestProject>
<ImplicitUsings>true</ImplicitUsings>
<Nullable>enable</Nullable>
<DebugSymbols>true</DebugSymbols>
<DebugType>embedded</DebugType>
</PropertyGroup>

<!-- Documentation -->
<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<DefaultDocumentationFolder>../../../docs/master-commander</DefaultDocumentationFolder>
<DefaultDocumentationLinksOutputFile>../../../docs/links</DefaultDocumentationLinksOutputFile>
<DefaultDocumentationAssemblyPageName>MasterCommander</DefaultDocumentationAssemblyPageName>
<DefaultDocumentationFileNameFactory>Name</DefaultDocumentationFileNameFactory>
<DefaultDocumentationGeneratedPages>Assembly,Types,Members</DefaultDocumentationGeneratedPages>
<DefaultDocumentationNamespaceDocItem>
<DefaultDocumentationSections>Title|summary|TableOfContents</DefaultDocumentationSections>
<Markdown.TableOfContentsModes>IncludeKind,IncludeSummary</Markdown.TableOfContentsModes>
</DefaultDocumentationNamespaceDocItem>
</PropertyGroup>

<!-- Code Analysis -->
<PropertyGroup>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<AnalysisLevel>8.0-recommended</AnalysisLevel>
<AnalysisModeDesign>All</AnalysisModeDesign>
<AnalysisModeDocumentation>All</AnalysisModeDocumentation>
<AnalysisModeGlobalization>All</AnalysisModeGlobalization>
<AnalysisModeInteroperability>All</AnalysisModeInteroperability>
<AnalysisModeMaintainability>All</AnalysisModeMaintainability>
<AnalysisModeNaming>All</AnalysisModeNaming>
<AnalysisModePerformance>All</AnalysisModePerformance>
<AnalysisModeSingleFile>All</AnalysisModeSingleFile>
<AnalysisModeReliability>All</AnalysisModeReliability>
<AnalysisModeSecurity>All</AnalysisModeSecurity>
<AnalysisModeStyle>All</AnalysisModeStyle>
<AnalysisModeUsage>All</AnalysisModeUsage>
</PropertyGroup>

<!-- Continuous Integration -->
<PropertyGroup Label="Deterministic Build">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>

<!-- Packaging -->
<PropertyGroup Label="Package Information">
<EnablePackageValidation>true</EnablePackageValidation>
<!--<PackageValidationBaselineVersion>1.0.0</PackageValidationBaselineVersion>-->

<Description>
MasterCommander is a versatile command-line utility designed to streamline the workflow for developers working
with multiple technology stacks. By integrating common operations for Git, .NET, Docker, and npm into a single
application, MasterCommander enhances productivity and simplifies project setup and management tasks.
</Description>
<Authors>Philippe Matray</Authors>
<Copyright>Philippe Matray</Copyright>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/phmatray/MasterCommander</RepositoryUrl>
<PackageProjectUrl>https://github.com/phmatray/MasterCommander</PackageProjectUrl>
<PackageReleaseNotes>https://github.com/phmatray/MasterCommander/releases</PackageReleaseNotes>
<PackageLicenseExpression>GPL-3.0-or-later</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageIcon>logo.png</PackageIcon>
<PackageTags>git, docker, cli, npm, devops utility, library, tool, dotnet, project-management, developers, workflow-automation</PackageTags>
</PropertyGroup>

<!-- Source Link -->
<PropertyGroup Label="Source Link">
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
</PropertyGroup>

<!-- File inclusion -->
<ItemGroup>
<None Include="../../../logo.png" Pack="true" PackagePath="\" Link="Properties/logo.png" />
<None Include="../../../LICENSE" Pack="true" PackagePath="\" Link="Properties/LICENSE" />
<None Include="../../../README.md" Pack="true" PackagePath="\" Link="Properties/README.md" />
<AdditionalFiles Include="$(MSBuildThisFileDirectory)stylecop.json" Link="Properties/stylecop.json" />
</ItemGroup>

<!-- MinVer Configuration -->
<PropertyGroup>
<!-- Set the minimum version to be used if no Git tags are found -->
<MinVerMinimumMajorMinor>1.0</MinVerMinimumMajorMinor>
<MinVerSkip Condition="'$(Configuration)' == 'Debug'">true</MinVerSkip>
<MinVerTagPrefix>v</MinVerTagPrefix>
<MinVerAutoIncrement>patch</MinVerAutoIncrement>
<MinVerDefaultPreReleaseIdentifiers>alpha</MinVerDefaultPreReleaseIdentifiers>
<MinVerIgnoreHeight>true</MinVerIgnoreHeight>
</PropertyGroup>

<ItemGroup Label="Dependencies" Condition="'$(IsTestProject)' != 'true'">
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
</ItemGroup>

<ItemGroup Label="Development Dependencies">
<!-- Code Analyzers -->
<PackageReference Include="StyleCop.Analyzers" PrivateAssets="all" />
<PackageReference Include="Roslynator.Analyzers" PrivateAssets="all"/>
<!-- Reproducible Builds -->
<PackageReference Include="DotNet.ReproducibleBuilds" PrivateAssets="all"/>
<!-- MinVer -->
<PackageReference Include="MinVer" PrivateAssets="all"/>
</ItemGroup>

<ItemGroup Label="Test Dependencies" Condition="$(IsTestProject)">
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="xunit" />
<PackageReference Include="FluentAssertions" />
<PackageReference Include="Snapshooter.Xunit" />
<PackageReference Include="Verify.XUnit" />
<PackageReference Include="FluentValidation" />
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" PrivateAssets="all" />
<PackageReference Include="xunit.runner.visualstudio" PrivateAssets="all" />
<PackageReference Include="coverlet.collector" PrivateAssets="all" />
</ItemGroup>

<Import Project="../msbuild/props/General.props"/>
<Import Project="../msbuild/props/Dependencies.props"/>
<Import Project="../msbuild/props/Documentation.props"/>
<Import Project="../msbuild/props/CodeAnalysis.props"/>
<Import Project="../msbuild/props/ContinuousIntegration.props"/>
<Import Project="../msbuild/props/Packaging.props"/>
<Import Project="../msbuild/props/SourceLink.props"/>
<Import Project="../msbuild/props/FileInclusion.props"/>
<Import Project="../msbuild/props/Versioning.props"/>
</Project>

Loading

0 comments on commit 70b2c11

Please sign in to comment.