migrate to central package management (#303)

* migrate to CPM

Signed-off-by: Oisin Grehan <oisin.grehan@ionodes.com>
This commit is contained in:
Oisin Grehan 2024-08-13 10:18:34 -04:00 committed by GitHub
parent f22fda229b
commit 6b038d067c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
20 changed files with 80 additions and 40 deletions

24
Directory.Packages.props Normal file
View File

@ -0,0 +1,24 @@
<Project>
<ItemGroup>
<PackageVersion Include="AMQPNetLite" Version="2.4.11" />
<PackageVersion Include="AMQPNetLite.Serialization" Version="2.4.11" />
<PackageVersion Include="Apache.Avro" Version="1.11.3" />
<PackageVersion Include="Confluent.Kafka" Version="1.9.3" />
<PackageVersion Include="Google.Protobuf" Version="3.27.3" />
<PackageVersion Include="McMaster.Extensions.CommandLineUtils" Version="4.1.1" />
<PackageVersion Include="Microsoft.AspNetCore.Http" Version="2.1.34" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="6.0.32" />
<PackageVersion Include="Microsoft.CSharp" Version="4.7.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
<PackageVersion Include="MQTTnet" Version="4.3.6.1152" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
<PackageVersion Include="Nullable" Version="1.3.1" />
<PackageVersion Include="System.Memory" Version="4.5.5" />
<PackageVersion Include="System.Text.Encodings.Web" Version="8.0.0" />
<PackageVersion Include="System.Text.Json" Version="8.0.4" />
<PackageVersion Include="xunit" Version="2.9.0" />
<PackageVersion Include="xunit.runner.console" Version="2.9.0" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2" />
</ItemGroup>
</Project>

View File

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFrameworks>net6.0</TargetFrameworks>
@ -11,3 +11,4 @@
</ItemGroup>
</Project>

View File

@ -11,7 +11,8 @@
<SignAssembly>True</SignAssembly>
<Deterministic>True</Deterministic>
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<!-- Never pack any sample projects -->
<IsPackable>False</IsPackable>
</PropertyGroup>

View File

@ -1,6 +1,6 @@
<Project>
<!-- Use SourceLink for all production projects, as a simple way of handling DeterministicSourcePaths -->
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All"/>
</ItemGroup>
</Project>

View File

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
@ -6,9 +6,10 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="McMaster.Extensions.CommandLineUtils" Version="4.1.1" />
<PackageReference Include="McMaster.Extensions.CommandLineUtils" />
<ProjectReference Include="..\..\src\CloudNative.CloudEvents\CloudNative.CloudEvents.csproj" />
<ProjectReference Include="..\..\src\CloudNative.CloudEvents.NewtonsoftJson\CloudNative.CloudEvents.NewtonsoftJson.csproj" />
</ItemGroup>
</Project>

View File

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net8.0</TargetFrameworks>
@ -9,11 +9,12 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AMQPNetLite" Version="2.4.11" />
<PackageReference Include="AMQPNetLite.Serialization" Version="2.4.11" />
<PackageReference Include="AMQPNetLite" />
<PackageReference Include="AMQPNetLite.Serialization" />
<ProjectReference Include="..\CloudNative.CloudEvents\CloudNative.CloudEvents.csproj" />
<!-- Source-only package with nullable reference annotations. -->
<PackageReference Include="Nullable" Version="1.3.1" PrivateAssets="All" />
<PackageReference Include="Nullable" PrivateAssets="All" />
</ItemGroup>
</Project>

View File

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net8.0</TargetFrameworks>
@ -13,8 +13,8 @@
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'netstandard2.1'">
<PackageReference Include="Microsoft.AspNetCore.Http" Version="2.1.34" />
<PackageReference Include="System.Text.Encodings.Web" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Http" />
<PackageReference Include="System.Text.Encodings.Web" />
</ItemGroup>
<ItemGroup>
@ -22,3 +22,4 @@
</ItemGroup>
</Project>

View File

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net8.0</TargetFrameworks>
@ -9,13 +9,13 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Apache.Avro" Version="1.11.3" />
<PackageReference Include="Apache.Avro" />
<!--
- Explicit dependency just to avoid a vulnerable version being exposed via Apache.Avro.
- If Apache.Avro publishes a new version that updates the dependency (to 13.0.1 or higher)
- we can remove our explicit dependency.
-->
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Newtonsoft.Json" />
<ProjectReference Include="..\CloudNative.CloudEvents\CloudNative.CloudEvents.csproj" />
</ItemGroup>
@ -24,3 +24,4 @@
</ItemGroup>
</Project>

View File

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net8.0</TargetFrameworks>
@ -9,8 +9,9 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Confluent.Kafka" Version="1.9.3" />
<PackageReference Include="Confluent.Kafka" />
<ProjectReference Include="..\CloudNative.CloudEvents\CloudNative.CloudEvents.csproj" />
</ItemGroup>
</Project>

View File

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net8.0</TargetFrameworks>
@ -11,8 +11,9 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MQTTnet" Version="4.3.6.1152" />
<PackageReference Include="MQTTnet" />
<ProjectReference Include="..\CloudNative.CloudEvents\CloudNative.CloudEvents.csproj" />
</ItemGroup>
</Project>

View File

@ -9,8 +9,9 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Newtonsoft.Json" />
<ProjectReference Include="..\CloudNative.CloudEvents\CloudNative.CloudEvents.csproj" />
</ItemGroup>
</Project>

View File

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net8.0</TargetFrameworks>
@ -9,7 +9,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Google.Protobuf" Version="3.27.3" />
<PackageReference Include="Google.Protobuf" />
<!-- Be explicit about not including these files in the package. -->
<None Include="README.md" />
@ -20,3 +20,4 @@
</ItemGroup>
</Project>

View File

@ -9,7 +9,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.Text.Json" Version="8.0.4" Condition="'$(TargetFramework)'=='netstandard2.0' or '$(TargetFramework)'=='netstandard2.1'" />
<PackageReference Include="System.Text.Json" Condition="'$(TargetFramework)'=='netstandard2.0' or '$(TargetFramework)'=='netstandard2.1'" />
</ItemGroup>
<ItemGroup>
@ -17,3 +17,4 @@
</ItemGroup>
</Project>

View File

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net8.0</TargetFrameworks>
@ -9,9 +9,9 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.Memory" Version="4.5.5" Condition="'$(TargetFramework)'=='netstandard2.0'" />
<PackageReference Include="System.Memory" Condition="'$(TargetFramework)'=='netstandard2.0'" />
<!-- Source-only package with nullable reference annotations. -->
<PackageReference Include="Nullable" Version="1.3.1" PrivateAssets="All" />
<PackageReference Include="Nullable" PrivateAssets="All" />
</ItemGroup>
<ItemGroup>
@ -30,3 +30,4 @@
</ItemGroup>
</Project>

View File

@ -29,7 +29,8 @@
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<EnablePackageValidation>true</EnablePackageValidation>
<ApiCompatEnableRuleCannotChangeParameterName>true</ApiCompatEnableRuleCannotChangeParameterName>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<!-- Package properties -->
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
<PublishRepositoryUrl>true</PublishRepositoryUrl>

View File

@ -10,7 +10,7 @@
<!-- Use SourceLink for all production projects, and include the licence file -->
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All"/>
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All"/>
<None Include="$(RepoRoot)/LICENSE" Pack="true" PackagePath="" />
</ItemGroup>
</Project>

View File

@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="6.0.32" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="xunit" Version="2.9.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="xunit" />
<PackageReference Include="xunit.runner.visualstudio">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
@ -20,3 +20,4 @@
</ItemGroup>
</Project>

View File

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
@ -10,14 +10,14 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="xunit" Version="2.9.0" />
<PackageReference Include="xunit.runner.console" Version="2.9.0">
<PackageReference Include="Microsoft.CSharp" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="xunit" />
<PackageReference Include="xunit.runner.console">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<PackageReference Include="xunit.runner.visualstudio">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
@ -39,3 +39,4 @@
<EmbeddedResource Include="..\..\src\CloudNative.CloudEvents.Avro\AvroSchema.json" />
</ItemGroup>
</Project>

View File

@ -11,6 +11,7 @@
<SignAssembly>True</SignAssembly>
<Deterministic>True</Deterministic>
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<!-- Never pack any test projects -->
<IsPackable>False</IsPackable>

View File

@ -10,7 +10,7 @@
<!-- Use SourceLink for all production projects, and include the licence file -->
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All"/>
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All"/>
<None Include="$(RepoRoot)/LICENSE" Pack="true" PackagePath="" />
</ItemGroup>
</Project>