Skip to content

Commit

Permalink
Use Nuget Central Package Version Management (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
flobernd authored Sep 14, 2022
1 parent 8d22660 commit 784a908
Show file tree
Hide file tree
Showing 10 changed files with 238 additions and 81 deletions.
Binary file modified Assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!-- https://devblogs.microsoft.com/nuget/introducing-central-package-management/ -->
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="coverlet.collector" Version="3.1.2" />
<PackageVersion Include="JetBrains.Annotations" Version="2022.1.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.3.1" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="1.1.1" />
<PackageVersion Include="Microsoft.TestPlatform.ObjectModel" Version="17.3.1" />
<PackageVersion Include="Nerdbank.GitVersioning" Version="3.5.109" />
<PackageVersion Include="Nullable" Version="1.3.1" />
<PackageVersion Include="xunit" Version="2.4.2" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.4.5" />
</ItemGroup>
</Project>
13 changes: 13 additions & 0 deletions NuGet.Config
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>
<!-- https://devblogs.microsoft.com/nuget/introducing-package-source-mapping/ -->
<packageSourceMapping>
<packageSource key="nuget.org">
<package pattern="*" />
</packageSource>
</packageSourceMapping>
</configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>

<ItemGroup>
<None Include="packages.lock.json" Visible="false" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\ZySharp.Validation\ZySharp.Validation.csproj" />
</ItemGroup>
Expand Down
15 changes: 8 additions & 7 deletions ZySharp.Validation.Examples/packages.lock.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
{
"version": 1,
"version": 2,
"dependencies": {
"net6.0": {
"JetBrains.Annotations": {
"type": "Transitive",
"resolved": "2022.1.0",
"contentHash": "ASfpoFJxiRsC9Xc4TWuPM41Zb/gl64xwfMOhnOZ3RnVWGYIZchjpWQV5zshJgoc/ZxVtgjaF7b577lURj7E6ig=="
},
"zysharp.validation": {
"type": "Project",
"dependencies": {
"JetBrains.Annotations": "2022.1.0"
"JetBrains.Annotations": "[2022.1.0, )"
}
},
"JetBrains.Annotations": {
"type": "CentralTransitive",
"requested": "[2022.1.0, )",
"resolved": "2022.1.0",
"contentHash": "ASfpoFJxiRsC9Xc4TWuPM41Zb/gl64xwfMOhnOZ3RnVWGYIZchjpWQV5zshJgoc/ZxVtgjaF7b577lURj7E6ig=="
}
}
}
Expand Down
17 changes: 12 additions & 5 deletions ZySharp.Validation.Tests/ZySharp.Validation.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,22 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" />
<None Include="packages.lock.json" Visible="false" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<!-- https://github.com/microsoft/vstest/issues/2469 -->
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" Version="17.2.0" Condition="$(TargetFramework.StartsWith('net4')) AND '$(OS)' == 'Unix'" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" Condition="$(TargetFramework.StartsWith('net4')) AND '$(OS)' == 'Unix'" />
<PackageReference Include="xunit" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.1.2">
<PackageReference Include="xunit.runner.visualstudio">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
131 changes: 68 additions & 63 deletions ZySharp.Validation.Tests/packages.lock.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": 1,
"version": 2,
"dependencies": {
".NETCoreApp,Version=v3.1": {
"coverlet.collector": {
Expand All @@ -10,12 +10,12 @@
},
"Microsoft.NET.Test.Sdk": {
"type": "Direct",
"requested": "[17.2.0, )",
"resolved": "17.2.0",
"contentHash": "kYmkDYbcDd+jNvmMH4TMtgHjsUYbIsWENM2VcjB0X7TawXbehL5I8OIsu2TgFS/nQCgZE94InrqMxrm7WDy+Lw==",
"requested": "[17.3.1, )",
"resolved": "17.3.1",
"contentHash": "jH9W5uYannaJ3HhrPBkzSidf3WkqP6XI+Yke0ODYVuFWM6GLVtBAyNgXvU/uQXPBsHq4aysLTsrN1FvG2hlKoQ==",
"dependencies": {
"Microsoft.CodeCoverage": "17.2.0",
"Microsoft.TestPlatform.TestHost": "17.2.0"
"Microsoft.CodeCoverage": "17.3.1",
"Microsoft.TestPlatform.TestHost": "17.3.1"
}
},
"xunit": {
Expand All @@ -35,15 +35,10 @@
"resolved": "2.4.5",
"contentHash": "OwHamvBdUKgqsXfBzWiCW/O98BTx81UKzx2bieIOQI7CZFE5NEQZGi8PBQGIKawDW96xeRffiNf20SjfC0x9hw=="
},
"JetBrains.Annotations": {
"type": "Transitive",
"resolved": "2022.1.0",
"contentHash": "ASfpoFJxiRsC9Xc4TWuPM41Zb/gl64xwfMOhnOZ3RnVWGYIZchjpWQV5zshJgoc/ZxVtgjaF7b577lURj7E6ig=="
},
"Microsoft.CodeCoverage": {
"type": "Transitive",
"resolved": "17.2.0",
"contentHash": "MsKhJmwIfHxNDbTIlgQy29UpWSWPpbZOQPhQ7xalRy+ABnl8/neFHZGzSP3XlpW2dKAXHTFrtIcKzW/kopY2Bg=="
"resolved": "17.3.1",
"contentHash": "WqB7Ik4v8ku0Y9HZShqTStZdq8R1lyhsZr7IMp8zV/OcL5sHVYvlMnardQR+SDQc3dmbniCIl9mYxYM+V7x8MA=="
},
"Microsoft.CSharp": {
"type": "Transitive",
Expand Down Expand Up @@ -78,21 +73,12 @@
"resolved": "1.1.0",
"contentHash": "aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg=="
},
"Microsoft.TestPlatform.ObjectModel": {
"type": "Transitive",
"resolved": "17.2.0",
"contentHash": "7j1KYDHLhU98XnCEbECMncXLydI9fNiFLcFsiBsP3lV6EkHOaj5kTPAWHYkKnPGRC9TbZUboSQq8rWI4dTQsxg==",
"dependencies": {
"NuGet.Frameworks": "5.11.0",
"System.Reflection.Metadata": "1.6.0"
}
},
"Microsoft.TestPlatform.TestHost": {
"type": "Transitive",
"resolved": "17.2.0",
"contentHash": "bI67J+hers241h7eD2eecS02p9CbKcQDIeoRvO4FgMlTWg2ZTzc0D3uWLYr5U+K5x9O1pNmyMoMDbYIeWY/TWw==",
"resolved": "17.3.1",
"contentHash": "co/GMz6rGxpzn2aJYTDDim61HvEk+SHBVtbXnu2RSrz20HxkaraEh0kltCsMkmLAX/6Hz5sa6NquLngBlURTow==",
"dependencies": {
"Microsoft.TestPlatform.ObjectModel": "17.2.0",
"Microsoft.TestPlatform.ObjectModel": "17.3.1",
"Newtonsoft.Json": "9.0.1"
}
},
Expand Down Expand Up @@ -1102,7 +1088,23 @@
"zysharp.validation": {
"type": "Project",
"dependencies": {
"JetBrains.Annotations": "2022.1.0"
"JetBrains.Annotations": "[2022.1.0, )"
}
},
"JetBrains.Annotations": {
"type": "CentralTransitive",
"requested": "[2022.1.0, )",
"resolved": "2022.1.0",
"contentHash": "ASfpoFJxiRsC9Xc4TWuPM41Zb/gl64xwfMOhnOZ3RnVWGYIZchjpWQV5zshJgoc/ZxVtgjaF7b577lURj7E6ig=="
},
"Microsoft.TestPlatform.ObjectModel": {
"type": "CentralTransitive",
"requested": "[17.3.1, )",
"resolved": "17.3.1",
"contentHash": "n1WSFCMiFt6KmD5JzV+Wye5Ntomez3YP2+d15bu5PS5Z1U0g+V7VBLdJIaJRnahz5BsXJDTnLYNVOUdntwjx6Q==",
"dependencies": {
"NuGet.Frameworks": "5.11.0",
"System.Reflection.Metadata": "1.6.0"
}
}
},
Expand All @@ -1115,11 +1117,11 @@
},
"Microsoft.NET.Test.Sdk": {
"type": "Direct",
"requested": "[17.2.0, )",
"resolved": "17.2.0",
"contentHash": "kYmkDYbcDd+jNvmMH4TMtgHjsUYbIsWENM2VcjB0X7TawXbehL5I8OIsu2TgFS/nQCgZE94InrqMxrm7WDy+Lw==",
"requested": "[17.3.1, )",
"resolved": "17.3.1",
"contentHash": "jH9W5uYannaJ3HhrPBkzSidf3WkqP6XI+Yke0ODYVuFWM6GLVtBAyNgXvU/uQXPBsHq4aysLTsrN1FvG2hlKoQ==",
"dependencies": {
"Microsoft.CodeCoverage": "17.2.0"
"Microsoft.CodeCoverage": "17.3.1"
}
},
"xunit": {
Expand All @@ -1139,15 +1141,10 @@
"resolved": "2.4.5",
"contentHash": "OwHamvBdUKgqsXfBzWiCW/O98BTx81UKzx2bieIOQI7CZFE5NEQZGi8PBQGIKawDW96xeRffiNf20SjfC0x9hw=="
},
"JetBrains.Annotations": {
"type": "Transitive",
"resolved": "2022.1.0",
"contentHash": "ASfpoFJxiRsC9Xc4TWuPM41Zb/gl64xwfMOhnOZ3RnVWGYIZchjpWQV5zshJgoc/ZxVtgjaF7b577lURj7E6ig=="
},
"Microsoft.CodeCoverage": {
"type": "Transitive",
"resolved": "17.2.0",
"contentHash": "MsKhJmwIfHxNDbTIlgQy29UpWSWPpbZOQPhQ7xalRy+ABnl8/neFHZGzSP3XlpW2dKAXHTFrtIcKzW/kopY2Bg=="
"resolved": "17.3.1",
"contentHash": "WqB7Ik4v8ku0Y9HZShqTStZdq8R1lyhsZr7IMp8zV/OcL5sHVYvlMnardQR+SDQc3dmbniCIl9mYxYM+V7x8MA=="
},
"xunit.abstractions": {
"type": "Transitive",
Expand Down Expand Up @@ -1192,8 +1189,14 @@
"zysharp.validation": {
"type": "Project",
"dependencies": {
"JetBrains.Annotations": "2022.1.0"
"JetBrains.Annotations": "[2022.1.0, )"
}
},
"JetBrains.Annotations": {
"type": "CentralTransitive",
"requested": "[2022.1.0, )",
"resolved": "2022.1.0",
"contentHash": "ASfpoFJxiRsC9Xc4TWuPM41Zb/gl64xwfMOhnOZ3RnVWGYIZchjpWQV5zshJgoc/ZxVtgjaF7b577lURj7E6ig=="
}
},
"net6.0": {
Expand All @@ -1205,12 +1208,12 @@
},
"Microsoft.NET.Test.Sdk": {
"type": "Direct",
"requested": "[17.2.0, )",
"resolved": "17.2.0",
"contentHash": "kYmkDYbcDd+jNvmMH4TMtgHjsUYbIsWENM2VcjB0X7TawXbehL5I8OIsu2TgFS/nQCgZE94InrqMxrm7WDy+Lw==",
"requested": "[17.3.1, )",
"resolved": "17.3.1",
"contentHash": "jH9W5uYannaJ3HhrPBkzSidf3WkqP6XI+Yke0ODYVuFWM6GLVtBAyNgXvU/uQXPBsHq4aysLTsrN1FvG2hlKoQ==",
"dependencies": {
"Microsoft.CodeCoverage": "17.2.0",
"Microsoft.TestPlatform.TestHost": "17.2.0"
"Microsoft.CodeCoverage": "17.3.1",
"Microsoft.TestPlatform.TestHost": "17.3.1"
}
},
"xunit": {
Expand All @@ -1230,15 +1233,10 @@
"resolved": "2.4.5",
"contentHash": "OwHamvBdUKgqsXfBzWiCW/O98BTx81UKzx2bieIOQI7CZFE5NEQZGi8PBQGIKawDW96xeRffiNf20SjfC0x9hw=="
},
"JetBrains.Annotations": {
"type": "Transitive",
"resolved": "2022.1.0",
"contentHash": "ASfpoFJxiRsC9Xc4TWuPM41Zb/gl64xwfMOhnOZ3RnVWGYIZchjpWQV5zshJgoc/ZxVtgjaF7b577lURj7E6ig=="
},
"Microsoft.CodeCoverage": {
"type": "Transitive",
"resolved": "17.2.0",
"contentHash": "MsKhJmwIfHxNDbTIlgQy29UpWSWPpbZOQPhQ7xalRy+ABnl8/neFHZGzSP3XlpW2dKAXHTFrtIcKzW/kopY2Bg=="
"resolved": "17.3.1",
"contentHash": "WqB7Ik4v8ku0Y9HZShqTStZdq8R1lyhsZr7IMp8zV/OcL5sHVYvlMnardQR+SDQc3dmbniCIl9mYxYM+V7x8MA=="
},
"Microsoft.CSharp": {
"type": "Transitive",
Expand Down Expand Up @@ -1273,21 +1271,12 @@
"resolved": "1.1.0",
"contentHash": "aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg=="
},
"Microsoft.TestPlatform.ObjectModel": {
"type": "Transitive",
"resolved": "17.2.0",
"contentHash": "7j1KYDHLhU98XnCEbECMncXLydI9fNiFLcFsiBsP3lV6EkHOaj5kTPAWHYkKnPGRC9TbZUboSQq8rWI4dTQsxg==",
"dependencies": {
"NuGet.Frameworks": "5.11.0",
"System.Reflection.Metadata": "1.6.0"
}
},
"Microsoft.TestPlatform.TestHost": {
"type": "Transitive",
"resolved": "17.2.0",
"contentHash": "bI67J+hers241h7eD2eecS02p9CbKcQDIeoRvO4FgMlTWg2ZTzc0D3uWLYr5U+K5x9O1pNmyMoMDbYIeWY/TWw==",
"resolved": "17.3.1",
"contentHash": "co/GMz6rGxpzn2aJYTDDim61HvEk+SHBVtbXnu2RSrz20HxkaraEh0kltCsMkmLAX/6Hz5sa6NquLngBlURTow==",
"dependencies": {
"Microsoft.TestPlatform.ObjectModel": "17.2.0",
"Microsoft.TestPlatform.ObjectModel": "17.3.1",
"Newtonsoft.Json": "9.0.1"
}
},
Expand Down Expand Up @@ -2297,7 +2286,23 @@
"zysharp.validation": {
"type": "Project",
"dependencies": {
"JetBrains.Annotations": "2022.1.0"
"JetBrains.Annotations": "[2022.1.0, )"
}
},
"JetBrains.Annotations": {
"type": "CentralTransitive",
"requested": "[2022.1.0, )",
"resolved": "2022.1.0",
"contentHash": "ASfpoFJxiRsC9Xc4TWuPM41Zb/gl64xwfMOhnOZ3RnVWGYIZchjpWQV5zshJgoc/ZxVtgjaF7b577lURj7E6ig=="
},
"Microsoft.TestPlatform.ObjectModel": {
"type": "CentralTransitive",
"requested": "[17.3.1, )",
"resolved": "17.3.1",
"contentHash": "n1WSFCMiFt6KmD5JzV+Wye5Ntomez3YP2+d15bu5PS5Z1U0g+V7VBLdJIaJRnahz5BsXJDTnLYNVOUdntwjx6Q==",
"dependencies": {
"NuGet.Frameworks": "5.11.0",
"System.Reflection.Metadata": "1.6.0"
}
}
}
Expand Down
7 changes: 5 additions & 2 deletions ZySharp.Validation.sln
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{0061F8B5-AEA1-472D-BFF0-93C96DB2B7F0}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
Directory.Packages.props = Directory.Packages.props
NuGet.Config = NuGet.Config
version.json = version.json
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZySharp.Validation.Tests", "ZySharp.Validation.Tests\ZySharp.Validation.Tests.csproj", "{D608FB0E-B1A2-4090-A88B-05B0E1057972}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ZySharp.Validation.Tests", "ZySharp.Validation.Tests\ZySharp.Validation.Tests.csproj", "{D608FB0E-B1A2-4090-A88B-05B0E1057972}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZySharp.Validation.Examples", "ZySharp.Validation.Examples\ZySharp.Validation.Examples.csproj", "{EF00B73C-11C6-482F-B8B7-951356AE8D75}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ZySharp.Validation.Examples", "ZySharp.Validation.Examples\ZySharp.Validation.Examples.csproj", "{EF00B73C-11C6-482F-B8B7-951356AE8D75}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
15 changes: 11 additions & 4 deletions ZySharp.Validation/ZySharp.Validation.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
<ImplicitUsings>disable</ImplicitUsings>

<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<RestoreLockedMode Condition="'$(ContinuousIntegrationBuild)' == 'true'" />

<PackageId>ZySharp.Validation</PackageId>
<Authors>Florian Bernd</Authors>
Expand Down Expand Up @@ -49,6 +52,10 @@
<None Include="..\README.md" Pack="true" PackagePath="" Visible="false" />
</ItemGroup>

<ItemGroup>
<None Include="packages.lock.json" Visible="false" />
</ItemGroup>

<ItemGroup>
<Compile Update="Properties\Resources.Designer.cs">
<DesignTime>True</DesignTime>
Expand All @@ -66,12 +73,12 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="all" />
<PackageReference Include="Nerdbank.GitVersioning" Version="3.5.109" PrivateAssets="all" />
<PackageReference Include="Nullable" Version="1.3.1" PrivateAssets="all" />
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="all" />
<PackageReference Include="Nerdbank.GitVersioning" PrivateAssets="all" />
<PackageReference Include="Nullable" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="JetBrains.Annotations" Version="2022.1.0" />
<PackageReference Include="JetBrains.Annotations" />
</ItemGroup>
</Project>
Loading

0 comments on commit 784a908

Please sign in to comment.