Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Add central nuget packaging #1073

Merged
merged 3 commits into from
Feb 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions src/Benchmarks/Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
</PropertyGroup>
<PropertyGroup>
<XUnitVersion>2.0.0-rc4-build2924</XUnitVersion>
</PropertyGroup>
<PropertyGroup Condition="$(IsTestProject) or $(MSBuildProjectName.Contains('TestRunner'))">
<XUnitVersion>1.7.0.1540</XUnitVersion>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="BenchmarkDotNet" Version="0.13.12" />
<PackageVersion Include="coverlet.msbuild" Version="1.0.0" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta-62905-03" />
<PackageVersion Include="Nerdbank.GitVersioning" Version="1.0.0-beta-gf8a674c064" />
<PackageVersion Include="Roslynator.Analyzers" Version="1.0.0-beta" />
<PackageVersion Include="stylecop.analyzers" Version="1.0.0-alpha001" />
<PackageVersion Include="System.Reactive" Version="5.0.0" />
<PackageVersion Include="xunit.runner.console" Version="$(XUnitVersion)" />
<PackageVersion Include="xunit.runner.visualstudio" Version="0.99.2-build2552" />
</ItemGroup>
<ItemGroup Condition="$(IsTestProject) or $(MSBuildProjectName.Contains('TestRunner'))">
<PackageVersion Include="FluentAssertions" Version="1.3.0.1" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20161024-02" />
<PackageVersion Include="Microsoft.Reactive.Testing" Version="0.0.1-alpha-00362" />
<PackageVersion Include="PublicApiGenerator" Version="4.0.0" />
<PackageVersion Include="Verify.Xunit" Version="1.0.0-beta.1" />
<PackageVersion Include="xunit" Version="$(XUnitVersion)" />
<PackageVersion Include="Xunit.StaFact" Version="0.1.7-alpha" />
</ItemGroup>
</Project>
8 changes: 3 additions & 5 deletions src/Benchmarks/Splat.Benchmarks.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<IsPackable>false</IsPackable>
<TargetFramework>net6.0</TargetFramework>
@@ -10,11 +9,10 @@
<NoWarn>;1591;1701;1702;1705;CA1822</NoWarn>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="*" />
<PackageReference Include="System.Reactive" Version="5.*" />
<PackageReference Include="BenchmarkDotNet" />
<PackageReference Include="System.Reactive" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Splat\Splat.csproj" />
</ItemGroup>

</Project>
</Project>
88 changes: 88 additions & 0 deletions src/Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
</PropertyGroup>
<PropertyGroup>
<AvaloniaVersion>11.0.9</AvaloniaVersion>
<ReactiveUIVersion>19.5.41</ReactiveUIVersion>
<XUnitVersion>2.6.6</XUnitVersion>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Autofac" Version="7.1.0" />
<PackageVersion Include="Avalonia.Desktop" Version="$(AvaloniaVersion)" />
<PackageVersion Include="Avalonia.Fonts.Inter" Version="$(AvaloniaVersion)" />
<PackageVersion Include="Avalonia.Headless.XUnit" Version="$(AvaloniaVersion)" />
<PackageVersion Include="Avalonia.ReactiveUI" Version="$(AvaloniaVersion)" />
<PackageVersion Include="Avalonia.Themes.Fluent" Version="$(AvaloniaVersion)" />
<PackageVersion Include="coverlet.msbuild" Version="6.0.0" />
<PackageVersion Include="DryIoc.Dll" Version="5.4.3" />
<PackageVersion Include="Exceptionless" Version="6.0.3" />
<PackageVersion Include="log4net" Version="2.0.15" />
<PackageVersion Include="Microsoft.AppCenter.Analytics" Version="5.0.3" />
<PackageVersion Include="Microsoft.AppCenter.Crashes" Version="5.0.3" />
<PackageVersion Include="Microsoft.ApplicationInsights" Version="2.21.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="8.0.0" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
<PackageVersion Include="Mindscape.Raygun4Net.NetCore" Version="8.0.0" />
<PackageVersion Include="Nerdbank.GitVersioning" Version="3.6.133" />
<PackageVersion Include="Ninject" Version="3.3.6" />
<PackageVersion Include="NLog" Version="5.2.6" />
<PackageVersion Include="Prism.Core" Version="8.1.97" />
<PackageVersion Include="Prism.Forms" Version="8.1.97" />
<PackageVersion Include="ReactiveUI" Version="$(ReactiveUIVersion)" />
<PackageVersion Include="Roslynator.Analyzers" Version="4.6.2" />
<PackageVersion Include="Serilog" Version="3.1.1" />
<PackageVersion Include="Serilog.Exceptions" Version="8.4.0" />
<PackageVersion Include="SimpleInjector" Version="5.4.2" />
<PackageVersion Include="stylecop.analyzers" Version="1.2.0-beta.507" />
<PackageVersion Include="System.AppContext" Version="4.3.0" />
<PackageVersion Include="System.Collections.Immutable" Version="8.0.0" />
<PackageVersion Include="System.Collections.NonGeneric" Version="4.3.0" />
<PackageVersion Include="System.Console" Version="4.3.1" />
<PackageVersion Include="System.Diagnostics.Debug" Version="4.3.0" />
<PackageVersion Include="System.Diagnostics.Process" Version="4.3.0" />
<PackageVersion Include="System.Diagnostics.StackTrace" Version="4.3.0" />
<PackageVersion Include="System.Diagnostics.TraceSource" Version="4.3.0" />
<PackageVersion Include="System.IO.FileSystem" Version="4.3.0" />
<PackageVersion Include="System.IO.FileSystem.Watcher" Version="4.3.0" />
<PackageVersion Include="System.Linq" Version="4.3.0" />
<PackageVersion Include="System.Net.NameResolution" Version="4.3.0" />
<PackageVersion Include="System.Net.Requests" Version="4.3.0" />
<PackageVersion Include="System.Net.Sockets" Version="4.3.0" />
<PackageVersion Include="System.Reflection" Version="4.3.0" />
<PackageVersion Include="System.Reflection.Extensions" Version="4.3.0" />
<PackageVersion Include="System.Reflection.TypeExtensions" Version="4.7.0" />
<PackageVersion Include="System.Runtime.Extensions" Version="4.3.1" />
<PackageVersion Include="System.Runtime.InteropServices" Version="4.3.0" />
<PackageVersion Include="System.Runtime.InteropServices.RuntimeInformation" Version="4.3.0" />
<PackageVersion Include="System.Runtime.Serialization.Formatters" Version="4.3.0" />
<PackageVersion Include="System.Text.RegularExpressions" Version="4.3.1" />
<PackageVersion Include="System.Threading" Version="4.3.0" />
<PackageVersion Include="System.Threading.Thread" Version="4.3.0" />
<PackageVersion Include="System.Threading.Timer" Version="4.3.0" />
<PackageVersion Include="System.Xml.ReaderWriter" Version="4.3.1" />
<PackageVersion Include="System.Xml.XmlDocument" Version="4.3.0" />
<PackageVersion Include="xunit.runner.console" Version="$(XUnitVersion)" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.6" />
<PackageVersion Include="FluentAssertions" Version="6.12.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageVersion Include="Microsoft.Reactive.Testing" Version="6.0.0" />
<PackageVersion Include="PublicApiGenerator" Version="11.1.0" />
<PackageVersion Include="Verify.Xunit" Version="23.0.0" />
<PackageVersion Include="xunit" Version="$(XUnitVersion)" />
<PackageVersion Include="Xunit.StaFact" Version="1.1.11" />
</ItemGroup>
<ItemGroup Condition="$(TargetFramework.StartsWith('net4'))">
<PackageVersion Include="System.Drawing.Primitives" Version="4.3.0" />
</ItemGroup>
<ItemGroup Condition="$(TargetFramework.StartsWith('net46'))">
<PackageVersion Include="System.ValueTuple" Version="4.5.0" />
</ItemGroup>
<ItemGroup Condition="$(TargetFramework.StartsWith('netstandard'))">
<PackageVersion Include="System.Diagnostics.Contracts" Version="4.3.0" />
<PackageVersion Include="System.Drawing.Primitives" Version="4.3.0" />
<PackageVersion Include="System.Runtime.Serialization.Primitives" Version="4.3.0" />
</ItemGroup>
</Project>
39 changes: 14 additions & 25 deletions src/Directory.build.props
Original file line number Diff line number Diff line change
@@ -28,7 +28,6 @@
<LangVersion>preview</LangVersion>
<Nullable>enable</Nullable>
<NoWarn>$(NoWarn);VSSpell001;SA1010</NoWarn>

<!-- disable sourcelink on mono, to workaround https://github.com/dotnet/sourcelink/issues/155 -->
<EnableSourceLink Condition=" '$(OS)' != 'Windows_NT' AND '$(MSBuildRuntimeType)' != 'Core' ">false</EnableSourceLink>
<EnableSourceControlManagerQueries>$(EnableSourceLink)</EnableSourceControlManagerQueries>
@@ -40,55 +39,45 @@
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
<SplatTargetFrameworks>netstandard2.0;net6.0;net7.0;net8.0</SplatTargetFrameworks>
<SplatWindowsTargetFrameworks>net6.0-windows10.0.17763.0;net7.0-windows10.0.17763.0;net8.0-windows10.0.17763.0</SplatWindowsTargetFrameworks>
<AvaloniaReactiveUIVersion>11.0.7</AvaloniaReactiveUIVersion>
</PropertyGroup>
<PropertyGroup Condition="$(IsTestProject) != 'true'">
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
</PropertyGroup>

<!-- MonoAndroid doesn't seem to want to allow debugging for maintainers -->
<PropertyGroup Condition=" $(TargetFramework.StartsWith('MonoAndroid')) ">
<DebugType>Full</DebugType>
</PropertyGroup>

<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>

<ItemGroup Condition="$(IsTestProject) or $(MSBuildProjectName.Contains('TestRunner'))">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="xunit" Version="2.6.6" />
<PackageReference Include="Xunit.StaFact" Version="1.1.11" />
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.Reactive.Testing" Version="6.0.0" />
<PackageReference Include="PublicApiGenerator" Version="11.1.0" />
<PackageReference Include="Verify.Xunit" Version="23.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="xunit" />
<PackageReference Include="Xunit.StaFact" />
<PackageReference Include="FluentAssertions" />
<PackageReference Include="Microsoft.Reactive.Testing" />
<PackageReference Include="PublicApiGenerator" />
<PackageReference Include="Verify.Xunit" />
</ItemGroup>

<ItemGroup Condition="$(IsTestProject)">
<PackageReference Include="xunit.runner.console" Version="2.6.6" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.6" />
<PackageReference Include="coverlet.msbuild" Version="6.0.0" />
<PackageReference Include="xunit.runner.console" />
<PackageReference Include="xunit.runner.visualstudio" />
<PackageReference Include="coverlet.msbuild" />
</ItemGroup>

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

<PropertyGroup>
<SolutionDir Condition="'$(SolutionDir)' == ''">$(MSBuildThisFileDirectory)</SolutionDir>
</PropertyGroup>

<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)..\LICENSE" Pack="true" PackagePath="LICENSE" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Nerdbank.GitVersioning" Version="3.6.133" PrivateAssets="all" />
<PackageReference Include="stylecop.analyzers" Version="1.2.0-beta.507" PrivateAssets="all" />
<PackageReference Include="Roslynator.Analyzers" Version="4.6.2" PrivateAssets="All" />
<PackageReference Include="Nerdbank.GitVersioning" PrivateAssets="all" />
<PackageReference Include="stylecop.analyzers" PrivateAssets="all" />
<PackageReference Include="Roslynator.Analyzers" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
<AdditionalFiles Include="$(MSBuildThisFileDirectory)stylecop.json" Link="stylecop.json" />
</ItemGroup>
9 changes: 2 additions & 7 deletions src/ReactiveUI.DI.Tests/ReactiveUI.DI.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net472;net6.0;</TargetFrameworks>
<NoWarn>$(NoWarn);1591;CA1707;SA1633;CA2000</NoWarn>
<IsPackable>false</IsPackable>
<Nullable>enable</Nullable>
</PropertyGroup>

<Choose>
<When Condition="$(TargetFramework.StartsWith('net472'))">
<ItemGroup>
@@ -25,14 +23,11 @@
</ItemGroup>
</When>
</Choose>

<ItemGroup>
<PackageReference Include="ReactiveUI" Version="19.5.41" />
<PackageReference Include="ReactiveUI" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Splat.Common.Test\Splat.Common.Test.csproj" />
<ProjectReference Include="..\Splat.DryIoc\Splat.DryIoc.csproj" />
</ItemGroup>

</Project>
</Project>
10 changes: 3 additions & 7 deletions src/Splat.AppCenter/Splat.AppCenter.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;$(SplatWindowsTargetFrameworks)</TargetFrameworks>
<!--need to consider? monoandroid50;xamarin.ios10 -->
@@ -9,14 +8,11 @@
<Description>Visual Studio AppCenter integrations for Splat</Description>
<PackageId>Splat.AppCenter</PackageId>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AppCenter.Analytics" Version="5.0.3" />
<PackageReference Include="Microsoft.AppCenter.Crashes" Version="5.0.3" />
<PackageReference Include="Microsoft.AppCenter.Analytics" />
<PackageReference Include="Microsoft.AppCenter.Crashes" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Splat\Splat.csproj" />
</ItemGroup>

</Project>
</Project>
Original file line number Diff line number Diff line change
@@ -9,11 +9,9 @@
<PackageId>Splat.ApplicationInsights</PackageId>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.21.0" />
<PackageReference Include="Microsoft.ApplicationInsights" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Splat\Splat.csproj" />
</ItemGroup>

</Project>
</Project>
8 changes: 2 additions & 6 deletions src/Splat.Autofac/Splat.Autofac.csproj
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>$(SplatTargetFrameworks)</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">$(TargetFrameworks);net462</TargetFrameworks>
<Description>Autofac adapter for Splat</Description>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Autofac" Version="7.*" />
<PackageReference Include="Autofac" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Splat\Splat.csproj" />
</ItemGroup>

</Project>
</Project>
8 changes: 3 additions & 5 deletions src/Splat.Avalonia.Autofac/Splat.Avalonia.Autofac.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>$(SplatTargetFrameworks)</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
@@ -8,10 +7,9 @@
<ItemGroup>
<Compile Include="..\Splat.Autofac\AutofacDependencyResolver.cs" Link="AutofacDependencyResolver.cs" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Avalonia.ReactiveUI" Version="$(AvaloniaReactiveUIVersion)" />
<PackageReference Include="Autofac" Version="7.*" />
<PackageReference Include="Avalonia.ReactiveUI" />
<PackageReference Include="Autofac" />
<ProjectReference Include="..\Splat\Splat.csproj" />
</ItemGroup>
</Project>
</Project>
9 changes: 3 additions & 6 deletions src/Splat.Avalonia.DryIoc/Splat.Avalonia.DryIoc.csproj
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>$(SplatTargetFrameworks)</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<Compile Include="..\Splat.DryIoc\DryIocDependencyResolver.cs" Link="DryIocDependencyResolver.cs" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Avalonia.ReactiveUI" Version="$(AvaloniaReactiveUIVersion)" />
<PackageReference Include="DryIoc.Dll" Version="5.4.3" />
<PackageReference Include="Avalonia.ReactiveUI" />
<PackageReference Include="DryIoc.Dll" />
<ProjectReference Include="..\Splat\Splat.csproj" />
</ItemGroup>
</Project>
</Project>
Loading

Unchanged files with check annotations Beta

var config = Bitmap.Config.Argb8888 ?? throw new InvalidOperationException("The ARGB8888 bitmap format is unavailable");
#pragma warning disable CA2000 // Dispose objects before losing scope
return Bitmap.CreateBitmap((int)width, (int)height, config)?.FromNative();

Check warning on line 108 in src/Splat.Drawing/Platforms/Android/Bitmaps/PlatformBitmapLoader.cs

GitHub Actions / build / build

'Bitmap.CreateBitmap((int)width, (int)height, config)' is never 'null'. Remove or refactor the condition(s) to avoid dead code. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1508)
#pragma warning restore CA2000 // Dispose objects before losing scope
}