Skip to content

Commit

Permalink
chore: Use centralized package management
Browse files Browse the repository at this point in the history
  • Loading branch information
jskeet committed Aug 14, 2024
1 parent 16c8952 commit d2b8878
Show file tree
Hide file tree
Showing 13 changed files with 85 additions and 28 deletions.
11 changes: 6 additions & 5 deletions CommonProperties.Test.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@

<!-- Common dependencies. Not *all* projects need all of these, but enough to make it worth doing. -->
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="xunit" Version="2.6.6" />
<PackageReference Include="Xunit.Combinatorial" Version="1.6.24" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.6" />
<PackageReference Include="NSubstitute" Version="5.1.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="xunit" />
<PackageReference Include="Xunit.Combinatorial" />
<PackageReference Include="xunit.runner.visualstudio" />
<PackageReference Include="NSubstitute" />
<PackageReference Include="Xunit.SkippableFact" />
</ItemGroup>

</Project>
3 changes: 1 addition & 2 deletions CommonProperties.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@

<!-- Common references -->
<ItemGroup>
<PackageReference Include="ConfigureAwaitChecker.Analyzer" Version="5.0.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" PrivateAssets="All" />
<PackageReference Include="ConfigureAwaitChecker.Analyzer" PrivateAssets="All" />
</ItemGroup>

<Import Project="ReleaseVersion.xml" />
Expand Down
8 changes: 8 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<Project>

<!-- Allow Directory.Packages.props to do its magic -->
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>

</Project>
2 changes: 1 addition & 1 deletion Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
- (not nested) item when DeterministicSourcePaths is true
-->
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All"/>
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All"/>
</ItemGroup>

<!-- See https://github.com/dotnet/sourcelink/issues/572 -->
Expand Down
37 changes: 37 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<Project>
<ItemGroup>
<!-- Test-oriented packages -->
<PackageVersion Include="xunit" Version="2.9.0" />
<PackageVersion Include="xunit.assert" Version="2.9.0" />
<PackageVersion Include="xunit.core" Version="2.9.0" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2" />
<PackageVersion Include="Xunit.SkippableFact" Version="1.4.13" />
<PackageVersion Include="Xunit.Combinatorial" Version="1.6.24" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageVersion Include="NSubstitute" Version="5.1.0" />

<!-- Google/gRPC packages -->
<PackageVersion Include="Grpc.Auth" Version="[2.60.0, 3.0.0)" />
<PackageVersion Include="Google.Apis.Auth" Version="[1.67.0, 2.0.0)" />
<PackageVersion Include="Google.Protobuf" Version="[3.25.0, 4.0.0)" />
<PackageVersion Include="Grpc.Core" Version="[2.46.6, 3.0.0)" />
<PackageVersion Include="Grpc.Core.Api" Version="[2.60.0, 3.0.0)" />
<PackageVersion Include="Grpc.Net.Client" Version="[2.60.0, 3.0.0)" />

<!-- Microsoft/System packages -->
<PackageVersion Include="Microsoft.Bcl.AsyncInterfaces" Version="6.0.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="6.0.1" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="6.0.0" />
<PackageVersion Include="System.Diagnostics.DiagnosticSource" Version="6.0.1" />
<PackageVersion Include="System.Linq.Async" Version="6.0.1" />
<PackageVersion Include="System.ValueTuple" Version="4.5.0" />

<!-- Other third party packages -->
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />

<!-- Build-oriented packages -->
<PackageVersion Include="ConfigureAwaitChecker.Analyzer" Version="5.0.0" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion Google.Api.CommonProtos/Google.Api.CommonProtos.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Google.Protobuf" Version="[3.25.0, 4.0.0)" />
<PackageReference Include="Google.Protobuf" />
<None Remove="proto-header.txt" />
<None Include="protos\**\*.proto" Pack="true" PackagePath="content/protos" />
<None Include="build\*.targets" Pack="true" PackagePath="build" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
<ItemGroup>
<ProjectReference Include="..\Google.Api.Gax.Grpc\Google.Api.Gax.Grpc.csproj" />
<ProjectReference Include="..\Google.Api.Gax.Grpc.Testing\Google.Api.Gax.Grpc.Testing.csproj" />
<PackageReference Include="Grpc.Core" Version="[2.46.6, 3.0.0)" />
<PackageReference Include="Grpc.Core" />
</ItemGroup>
</Project>
9 changes: 4 additions & 5 deletions Google.Api.Gax.Grpc.Tests/Google.Api.Gax.Grpc.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
<PackageReference Include="System.Linq.Async" Version="6.0.1" />
<PackageReference Include="Grpc.Core" Version="[2.46.6, 3.0.0)" />
<PackageReference Include="Xunit.SkippableFact" Version="1.4.13" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" />
<PackageReference Include="Microsoft.Extensions.Logging" />
<PackageReference Include="System.Linq.Async" />
<PackageReference Include="Grpc.Core" />
</ItemGroup>

<ItemGroup>
Expand Down
10 changes: 5 additions & 5 deletions Google.Api.Gax.Grpc/Google.Api.Gax.Grpc.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
<ProjectReference Include="..\Google.Api.CommonProtos\Google.Api.CommonProtos.csproj" />
<ProjectReference Include="..\Google.Api.Gax\Google.Api.Gax.csproj" />

<PackageReference Include="Grpc.Auth" Version="[2.60.0, 3.0.0)" />
<PackageReference Include="Google.Apis.Auth" Version="[1.67.00, 2.0.0)" />
<PackageReference Include="Grpc.Core.Api" Version="[2.60.0, 3.0.0)" />
<PackageReference Include="Grpc.Net.Client" Version="[2.60.0, 3.0.0)" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
<PackageReference Include="Grpc.Auth" />
<PackageReference Include="Google.Apis.Auth" />
<PackageReference Include="Grpc.Core.Api" />
<PackageReference Include="Grpc.Net.Client" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" />
</ItemGroup>
</Project>
4 changes: 2 additions & 2 deletions Google.Api.Gax.Rest.Tests/Google.Api.Gax.Rest.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Linq.Async" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.1" />
<PackageReference Include="System.Linq.Async" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions Google.Api.Gax.Rest/Google.Api.Gax.Rest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<ItemGroup>
<ProjectReference Include="..\Google.Api.Gax\Google.Api.Gax.csproj" />

<PackageReference Include="Google.Apis.Auth" Version="[1.67.0, 2.0.0)" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
<PackageReference Include="Google.Apis.Auth" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" />
</ItemGroup>
</Project>
8 changes: 4 additions & 4 deletions Google.Api.Gax/Google.Api.Gax.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="6.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="6.0.1" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" />
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="System.Diagnostics.DiagnosticSource" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net462' ">
<Reference Include="System.Net.Http" />
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
<PackageReference Include="System.ValueTuple" />
</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>

<packageSourceMapping>
<packageSource key="nuget.org">
<package pattern="*" />
</packageSource>
</packageSourceMapping>
</configuration>

0 comments on commit d2b8878

Please sign in to comment.