Skip to content

Commit

Permalink
introduce common Directory.Packages.props
Browse files Browse the repository at this point in the history
  • Loading branch information
arturcic committed Mar 4, 2024
1 parent 06478cd commit f2c5a83
Show file tree
Hide file tree
Showing 13 changed files with 72 additions and 26 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
*.dotCover
*.orig
*~
msbuild.binlog

## If you have NuGet Package Restore enabled, uncomment this
packages/
Expand Down
17 changes: 17 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="LibGit2Sharp" Version="0.29.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.9.2" />
<PackageVersion Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="3.3.4" />
<PackageVersion Include="Microsoft.CSharp" Version="4.7.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" />
<PackageVersion Include="Polly" Version="8.3.0" />
<PackageVersion Include="Roslynator.Analyzers" Version="4.11.0" />
<PackageVersion Include="Roslynator.Formatting.Analyzers" Version="4.11.0" />
</ItemGroup>
</Project>
9 changes: 2 additions & 7 deletions new-cli/Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove('$(MSBuildThisFile)', '$(MSBuildThisFileDirectory)..\'))" />
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="LibGit2Sharp" Version="0.29.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.9.2" />
<PackageVersion Include="Microsoft.CSharp" Version="4.7.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageVersion Include="Polly" Version="8.3.0" />

<PackageVersion Include="Scriban" Version="5.9.1" />
<PackageVersion Include="Serilog.Extensions.Logging" Version="8.0.0" />
<PackageVersion Include="Serilog.Sinks.Console" Version="5.0.1" />
<PackageVersion Include="Serilog.Sinks.File" Version="5.0.0" />
<PackageVersion Include="Serilog.Sinks.Map" Version="1.0.2" />
<PackageVersion Include="System.CommandLine" Version="2.0.0-beta4.24126.1" />
<PackageVersion Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion new-cli/GitVersion.Core/GitVersion.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<ProjectReference Include="..\GitVersion.Common\GitVersion.Common.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" />
<PackageReference Include="Serilog.Extensions.Logging" />
<PackageReference Include="Serilog.Sinks.Console" />
<PackageReference Include="Serilog.Sinks.File" />
Expand Down
6 changes: 6 additions & 0 deletions new-cli/GitVersion.sln
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitVersion.Core.Libgit2Shar
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitVersion.Cli.Generator", "GitVersion.Cli.Generator\GitVersion.Cli.Generator.csproj", "{AF22F642-625A-4A33-92A5-161EE4E2B0CE}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "root", "root", "{D27CECCB-F012-433C-B026-84979C8C731E}"
ProjectSection(SolutionItems) = preProject
..\global.json = ..\global.json
..\Directory.Packages.props = ..\Directory.Packages.props
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down
20 changes: 20 additions & 0 deletions src/.run/cli.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="cli" type="DotNetProject" factoryName=".NET Project">
<option name="EXE_PATH" value="$PROJECT_DIR$/GitVersion.App/bin/Debug/net8.0/gitversion.exe" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/GitVersion.App/bin/Debug/net8.0" />
<option name="PASS_PARENT_ENVS" value="1" />
<option name="USE_EXTERNAL_CONSOLE" value="0" />
<option name="USE_MONO" value="0" />
<option name="RUNTIME_ARGUMENTS" value="" />
<option name="PROJECT_PATH" value="$PROJECT_DIR$/GitVersion.App/GitVersion.App.csproj" />
<option name="PROJECT_EXE_PATH_TRACKING" value="1" />
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" />
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="1" />
<option name="PROJECT_KIND" value="DotNetCore" />
<option name="PROJECT_TFM" value="net8.0" />
<method v="2">
<option name="Build" />
</method>
</configuration>
</component>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="GitVersion.Schema" type="DotNetProject" factoryName=".NET Project">
<configuration default="false" name="schema" type="DotNetProject" factoryName=".NET Project">
<option name="EXE_PATH" value="$PROJECT_DIR$/GitVersion.Schema/bin/Debug/net8.0/schema.exe" />
<option name="PROGRAM_PARAMETERS" value="--OutputDirectory schemas --Version 6.0" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/.." />
Expand Down
1 change: 0 additions & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
</PackageReference>
</ItemGroup>
<ItemGroup Condition=" '$(IsUnitTestProject)' == 'true' ">
<PackageReference Include="Microsoft.Extensions.DependencyInjection"/>
<PackageReference Include="Microsoft.NET.Test.Sdk"/>

<PackageReference Include="NSubstitute"/>
Expand Down
9 changes: 1 addition & 8 deletions src/Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove('$(MSBuildThisFile)', '$(MSBuildThisFileDirectory)..\'))" />
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Buildalyzer" Version="6.0.4" />
<PackageVersion Include="JsonSchema.Net.Generation" Version="4.1.1" />
<PackageVersion Include="JunitXml.TestLogger" Version="3.1.12" />
<PackageVersion Include="LibGit2Sharp" Version="0.29.0" />
<PackageVersion Include="MSBuild.ProjectCreation" Version="11.0.1" />
<PackageVersion Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
<PackageVersion Include="Microsoft.Build" Version="17.9.5" />
<PackageVersion Include="Microsoft.Build.Utilities.Core" Version="17.9.5" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.9.2" />
<PackageVersion Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="3.3.4" />
<PackageVersion Include="Microsoft.Extensions.Configuration.CommandLine" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.FileSystemGlobbing" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Options" Version="8.0.2" />
Expand All @@ -25,9 +21,6 @@
<PackageVersion Include="NUnit" Version="4.1.0" />
<PackageVersion Include="NUnit.Analyzers" Version="4.0.1" />
<PackageVersion Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageVersion Include="Polly" Version="8.3.0" />
<PackageVersion Include="Roslynator.Analyzers" Version="4.11.0" />
<PackageVersion Include="Roslynator.Formatting.Analyzers" Version="4.11.0" />
<PackageVersion Include="Shouldly" Version="4.2.1" />
<PackageVersion Include="System.Text.Json" Version="8.0.2" />
<PackageVersion Include="YamlDotNet" Version="15.1.2" />
Expand Down
3 changes: 3 additions & 0 deletions src/GitVersion.Core.Tests/GitVersion.Core.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
<ProjectReference Include="..\GitVersion.Core\GitVersion.Core.csproj" />
<ProjectReference Include="..\GitVersion.Output\GitVersion.Output.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" />
</ItemGroup>
<ItemGroup>
<Content Include="VersionCalculation\Approved\**\*.approved.txt" />
<Content Include="VersionConverters\Approved\**\*.approved.txt" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" />
<PackageReference Include="Microsoft.Build" />
<PackageReference Include="Microsoft.Build.Utilities.Core" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" />
</ItemGroup>

<ItemGroup>
Expand Down
21 changes: 13 additions & 8 deletions src/GitVersion.sln
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "sln", "sln", "{542E443E-14C
ProjectSection(SolutionItems) = preProject
Directory.Build.props = Directory.Build.props
Directory.Packages.props = Directory.Packages.props
..\.editorconfig = ..\.editorconfig
..\.gitattributes = ..\.gitattributes
..\.gitignore = ..\.gitignore
..\GitVersion.yml = ..\GitVersion.yml
..\schemas\6.0\GitVersion.configuration.json = ..\schemas\6.0\GitVersion.configuration.json
..\schemas\6.0\GitVersion.json = ..\schemas\6.0\GitVersion.json
..\global.json = ..\global.json
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "readme", "readme", "{1F4BE015-699F-464A-8FF0-D8762102421A}"
Expand All @@ -56,6 +49,18 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "readme", "readme", "{1F4BE0
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitVersion.Configuration.Tests", "GitVersion.Configuration.Tests\GitVersion.Configuration.Tests.csproj", "{E3722E82-D283-4BA7-B44F-C43072B829FA}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "root", "root", "{7D3A83B4-95D9-42AF-AB11-6292209CF00B}"
ProjectSection(SolutionItems) = preProject
..\.editorconfig = ..\.editorconfig
..\.gitattributes = ..\.gitattributes
..\.gitignore = ..\.gitignore
..\GitVersion.yml = ..\GitVersion.yml
..\global.json = ..\global.json
..\schemas\6.0\GitVersion.json = ..\schemas\6.0\GitVersion.json
..\schemas\6.0\GitVersion.configuration.json = ..\schemas\6.0\GitVersion.configuration.json
..\Directory.Packages.props = ..\Directory.Packages.props
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -132,9 +137,9 @@ Global
{85060C01-6DAF-48E9-9D7E-AEDA8FFEB0DD} = {69C36B9D-E496-42A2-B091-C055E999686C}
{843450BC-3A6D-4DA6-8520-2D9A9C8218AC} = {69C36B9D-E496-42A2-B091-C055E999686C}
{13C60949-7225-4B08-BE63-CAAC5E25FD16} = {69C36B9D-E496-42A2-B091-C055E999686C}
{1F4BE015-699F-464A-8FF0-D8762102421A} = {542E443E-14C3-45A7-A2E9-ACF27286A3B2}
{B93C3F0C-6CBF-49E6-A476-A0103319640B} = {69C36B9D-E496-42A2-B091-C055E999686C}
{E3722E82-D283-4BA7-B44F-C43072B829FA} = {69C36B9D-E496-42A2-B091-C055E999686C}
{1F4BE015-699F-464A-8FF0-D8762102421A} = {7D3A83B4-95D9-42AF-AB11-6292209CF00B}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {0C1C310E-7A4D-4032-878B-6DC375894C49}
Expand Down
6 changes: 6 additions & 0 deletions tests/integration/Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ManagePackageVersionsCentrally>false</ManagePackageVersionsCentrally>
</PropertyGroup>
</Project>

0 comments on commit f2c5a83

Please sign in to comment.