Skip to content

Commit

Permalink
feature: Update to use nuget central packages (#755)
Browse files Browse the repository at this point in the history
  • Loading branch information
glennawatson authored Feb 17, 2024
1 parent 6605847 commit f98486a
Show file tree
Hide file tree
Showing 18 changed files with 258 additions and 227 deletions.
50 changes: 50 additions & 0 deletions Sample/Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
</PropertyGroup>
<PropertyGroup>
<AvaloniaVersion>11.0.9</AvaloniaVersion>
<ReactiveUIVersion>19.5.41</ReactiveUIVersion>
<XUnitVersion>1.7.0.1540</XUnitVersion>
<XamarinFormsVersion>5.0.0.2622</XamarinFormsVersion>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Avalonia" Version="$(AvaloniaVersion)" />
<PackageVersion Include="Avalonia.Desktop" Version="$(AvaloniaVersion)" />
<PackageVersion Include="Avalonia.ReactiveUI" Version="$(AvaloniaVersion)" />
<PackageVersion Include="Citrus.Avalonia" Version="2.1.1" />
<PackageVersion Include="coverlet.msbuild" Version="6.0.0" />
<PackageVersion Include="DiffEngine" Version="15.2.0" />
<PackageVersion Include="FluentAssertions" Version="6.12.0" />
<PackageVersion Include="MessageBox.Avalonia" Version="3.1.5.1" />
<PackageVersion Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
<PackageVersion Include="Nerdbank.GitVersioning" Version="3.6.133" />
<PackageVersion Include="NSubstitute" Version="5.1.0" />
<PackageVersion Include="PublicApiGenerator" Version="11.1.0" />
<PackageVersion Include="ReactiveUI" Version="$(ReactiveUIVersion)" />
<PackageVersion Include="ReactiveUI.Testing" Version="$(ReactiveUIVersion)" />
<PackageVersion Include="ReactiveUI.XamForms" Version="$(ReactiveUIVersion)" />
<PackageVersion Include="ReactiveUI.WPF" Version="$(ReactiveUIVersion)" />
<PackageVersion Include="Roslynator.Analyzers" Version="4.10.0" />
<PackageVersion Include="stylecop.analyzers" Version="1.2.0-beta.556" />
<PackageVersion Include="System.Collections.Immutable" Version="8.0.0" />
<PackageVersion Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
<PackageVersion Include="Verify.Xunit" Version="23.2.0" />
<PackageVersion Include="Xamarin.Forms" Version="$(XamarinFormsVersion)" />
<PackageVersion Include="Xamarin.Forms.Platform.WPF" Version="$(XamarinFormsVersion)" />
<PackageVersion Include="Xamarin.Forms.Mocks" Version="4.7.0.1" />
<PackageVersion Include="xunit" Version="$(XUnitVersion)" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.7" />
<PackageVersion Include="Xunit.StaFact" Version="1.1.11" />
</ItemGroup>
<ItemGroup Condition="'$(UseMaui)' != 'true'">
<PackageVersion Include="Microsoft.WindowsAppSDK" Version="1.4.231115000" />
</ItemGroup>
<ItemGroup Condition="$(TargetFramework.StartsWith('net8'))">
<PackageVersion Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
<PackageVersion Include="Microsoft.Maui.Controls.Compatibility" Version="$(MauiVersion)" />
</ItemGroup>
</Project>
4 changes: 2 additions & 2 deletions Sample/SextantSample.Android/SextantSample.Android.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="ReactiveUI.XamForms" Version="19.*" />
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
<PackageReference Include="ReactiveUI.XamForms" />
<PackageReference Include="System.Threading.Tasks.Extensions" />
</ItemGroup>
<ItemGroup>
<Compile Include="MainActivity.cs" />
Expand Down
9 changes: 3 additions & 6 deletions Sample/SextantSample.Avalonia/SextantSample.Avalonia.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@
<TargetFramework>net7.0</TargetFramework>
<LangVersion>preview</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Citrus.Avalonia" Version="2.1.1" />
<PackageReference Include="MessageBox.Avalonia" Version="3.1.5.1" />
<PackageReference Include="Citrus.Avalonia" />
<PackageReference Include="MessageBox.Avalonia" />
</ItemGroup>

<ItemGroup>
<Compile Update="**\*.xaml.cs">
<DependentUpon>%(Filename)</DependentUpon>
Expand All @@ -18,9 +16,8 @@
<SubType>Designer</SubType>
</AvaloniaResource>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\SextantSample.Core\SextantSample.ViewModels.csproj" />
<ProjectReference Include="..\..\src\Sextant.Avalonia\Sextant.Avalonia.csproj" />
</ItemGroup>
</Project>
</Project>
157 changes: 67 additions & 90 deletions Sample/SextantSample.Maui/SextantSample.Maui.csproj
Original file line number Diff line number Diff line change
@@ -1,113 +1,90 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0-ios;net8.0-android;net8.0-maccatalyst</TargetFrameworks>
<PropertyGroup>
<TargetFrameworks>net8.0-ios;net8.0-android;net8.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows')) and '$(MSBuildRuntimeType)' == 'Full'">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
<OutputType>Exe</OutputType>
<RootNamespace>SextantSample.Maui</RootNamespace>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>
<EnablePreviewMsixTooling>true</EnablePreviewMsixTooling>

<!-- Display name -->
<ApplicationTitle>SextantSample.Maui</ApplicationTitle>

<!-- App Identifier -->
<ApplicationId>com.companyname.SextantSample.Maui</ApplicationId>
<ApplicationId Condition="$(TargetFramework.Contains('-windows'))">919dc1f9-17a9-48b3-81f8-0b8016bdfbf7</ApplicationId>

<!-- Versions -->
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<ApplicationVersion>1</ApplicationVersion>

<!-- Required for C# Hot Reload -->
<UseInterpreter Condition="'$(Configuration)' == 'Debug'">True</UseInterpreter>

<RootNamespace>SextantSample.Maui</RootNamespace>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>
<EnablePreviewMsixTooling>true</EnablePreviewMsixTooling>
<!-- Display name -->
<ApplicationTitle>SextantSample.Maui</ApplicationTitle>
<!-- App Identifier -->
<ApplicationId>com.companyname.SextantSample.Maui</ApplicationId>
<ApplicationId Condition="$(TargetFramework.Contains('-windows'))">919dc1f9-17a9-48b3-81f8-0b8016bdfbf7</ApplicationId>
<!-- Versions -->
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<ApplicationVersion>1</ApplicationVersion>
<!-- Required for C# Hot Reload -->
<UseInterpreter Condition="'$(Configuration)' == 'Debug'">True</UseInterpreter>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">14.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
</PropertyGroup>

<ItemGroup>
<!-- App Icon -->

<!-- Splash Screen -->

<!-- Images -->
<MauiImage Include="Resources\Images\*" />

<!-- Custom Fonts -->
<MauiFont Include="Resources\Fonts\*" />

<!-- Raw Assets (also remove the "Resources\Raw" prefix) -->
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
</ItemGroup>

<ItemGroup>
<MauiAsset Remove="Resources\Raw\AboutAssets.txt" />
</ItemGroup>

<ItemGroup>
<MauiFont Remove="Resources\Fonts\OpenSans-Regular.ttf" />
<MauiFont Remove="Resources\Fonts\OpenSans-Semibold.ttf" />
</ItemGroup>

<ItemGroup>
<MauiImage Remove="Resources\Images\dotnet_bot.svg" />
</ItemGroup>

<ItemGroup>
<None Remove="Resources\AppIcon\appicon.svg" />
<None Remove="Resources\AppIcon\appiconfg.svg" />
<None Remove="Resources\Fonts\OpenSans-Semibold.ttf" />
<None Remove="Resources\Images\dotnet_bot.svg" />
<None Remove="Resources\Raw\AboutAssets.txt" />
<None Remove="Resources\Splash\splash.svg" />
</ItemGroup>

<ItemGroup>
<BundleResource Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" />
<BundleResource Include="Resources\AppIcon\appiconfg.svg" />
<BundleResource Include="Resources\Fonts\OpenSans-Regular.ttf" />
<BundleResource Include="Resources\Fonts\OpenSans-Semibold.ttf" />
<BundleResource Include="Resources\Images\dotnet_bot.svg" BaseSize="168,208" />
<BundleResource Include="Resources\Raw\AboutAssets.txt" />
<BundleResource Include="Resources\Splash\splash.svg" Color="#512BD4" BaseSize="128,128" />
</ItemGroup>

<ItemGroup>
<!-- App Icon -->
<!-- Splash Screen -->
<!-- Images -->
<MauiImage Include="Resources\Images\*" />
<!-- Custom Fonts -->
<MauiFont Include="Resources\Fonts\*" />
<!-- Raw Assets (also remove the "Resources\Raw" prefix) -->
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
</ItemGroup>
<ItemGroup>
<MauiAsset Remove="Resources\Raw\AboutAssets.txt" />
</ItemGroup>
<ItemGroup>
<MauiFont Remove="Resources\Fonts\OpenSans-Regular.ttf" />
<MauiFont Remove="Resources\Fonts\OpenSans-Semibold.ttf" />
</ItemGroup>
<ItemGroup>
<MauiImage Remove="Resources\Images\dotnet_bot.svg" />
</ItemGroup>
<ItemGroup>
<None Remove="Resources\AppIcon\appicon.svg" />
<None Remove="Resources\AppIcon\appiconfg.svg" />
<None Remove="Resources\Fonts\OpenSans-Semibold.ttf" />
<None Remove="Resources\Images\dotnet_bot.svg" />
<None Remove="Resources\Raw\AboutAssets.txt" />
<None Remove="Resources\Splash\splash.svg" />
</ItemGroup>
<ItemGroup>
<BundleResource Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" />
<BundleResource Include="Resources\AppIcon\appiconfg.svg" />
<BundleResource Include="Resources\Fonts\OpenSans-Regular.ttf" />
<BundleResource Include="Resources\Fonts\OpenSans-Semibold.ttf" />
<BundleResource Include="Resources\Images\dotnet_bot.svg" BaseSize="168,208" />
<BundleResource Include="Resources\Raw\AboutAssets.txt" />
<BundleResource Include="Resources\Splash\splash.svg" Color="#512BD4" BaseSize="128,128" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Sextant.Maui\Sextant.Maui.csproj" />
<ProjectReference Include="..\SextantSample.Core\SextantSample.ViewModels.csproj" AdditionalProperties="TargetFramework=net6.0" />
</ItemGroup>

<ItemGroup Condition="$(TargetFramework.StartsWith('net8'))">
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="$(MauiVersion)" />
<PackageReference Include="Microsoft.Maui.Controls" />
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" />
</ItemGroup>

<ItemGroup>
<Compile Update="Views\**\*.xaml.cs">
<DependentUpon>%(Filename)</DependentUpon>
</Compile>
<Compile Update="Views\**\*.xaml.cs">
<DependentUpon>%(Filename)</DependentUpon>
</Compile>
</ItemGroup>

<ItemGroup>
<MauiXaml Update="Views\**\*.xaml">
<SubType>Designer</SubType>
</MauiXaml>
<ItemGroup>
<MauiXaml Update="Views\**\*.xaml">
<SubType>Designer</SubType>
</MauiXaml>
</ItemGroup>

<PropertyGroup Condition="$(TargetFramework.Contains('-windows'))">
<PropertyGroup Condition="$(TargetFramework.Contains('-windows'))">
<OutputType>WinExe</OutputType>
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
<WindowsPackageType>MSIX</WindowsPackageType>
</PropertyGroup>

</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" />
</ItemGroup>

</Project>
</Project>
11 changes: 3 additions & 8 deletions Sample/SextantSample.WPF/SextantSample.WPF.csproj
Original file line number Diff line number Diff line change
@@ -1,24 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0-windows</TargetFramework>
<UseWPF>true</UseWPF>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ReactiveUI.WPF" Version="19.*" />
<PackageReference Include="Xamarin.Forms.Platform.WPF" Version="5.0.0.2622" />
<PackageReference Include="ReactiveUI.WPF" />
<PackageReference Include="Xamarin.Forms.Platform.WPF" />
</ItemGroup>

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

<!-- Workaround for Xamarin.Forms + WPF build issue -->
<!-- See also: https://github.com/xamarin/Xamarin.Forms/issues/13217 -->
<ItemGroup>
<EmbeddedResource Remove="**/*.xaml" />
</ItemGroup>

</Project>
</Project>
4 changes: 2 additions & 2 deletions Sample/SextantSample.iOS/SextantSample.iOS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@
<Reference Include="Xamarin.iOS" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="ReactiveUI.XamForms" Version="19.*" />
<PackageReference Include="Xamarin.Forms" Version="5.0.*" />
<PackageReference Include="ReactiveUI.XamForms" />
<PackageReference Include="Xamarin.Forms" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
<ItemGroup>
Expand Down
38 changes: 19 additions & 19 deletions Sample/SextantSample/SextantSample.csproj
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Platforms>AnyCPU;x64</Platforms>
<LangVersion>preview</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.Collections.Immutable" Version="8.0.0" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Remove="MainPage.xaml" />
</ItemGroup>
<ItemGroup>
<Compile Remove="Views\FirstModalNavigationView.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Sextant.XamForms\Sextant.XamForms.csproj" />
<ProjectReference Include="..\SextantSample.Core\SextantSample.ViewModels.csproj" />
</ItemGroup>
</Project>
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Platforms>AnyCPU;x64</Platforms>
<LangVersion>preview</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.Collections.Immutable" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Remove="MainPage.xaml" />
</ItemGroup>
<ItemGroup>
<Compile Remove="Views\FirstModalNavigationView.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Sextant.XamForms\Sextant.XamForms.csproj" />
<ProjectReference Include="..\SextantSample.Core\SextantSample.ViewModels.csproj" />
</ItemGroup>
</Project>
13 changes: 13 additions & 0 deletions src/Benchmarks/Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="BenchmarkDotNet" Version="0.13.12" />
</ItemGroup>

<!-- Inherit parent props file if one exists. -->
<Import Condition="$([MSBuild]::GetPathOfFileAbove('Directory.Packages.props', '$(MSBuildThisFileDirectory)../')) != ''"
Project="$([MSBuild]::GetPathOfFileAbove('Directory.Packages.props', '$(MSBuildThisFileDirectory)../'))" />
</Project>
4 changes: 2 additions & 2 deletions src/Benchmarks/Sextant.Benchmarks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
<NoWarn>;1591;1701;1702;1705;CA1822</NoWarn>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="*" />
<PackageReference Include="BenchmarkDotNet" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Sextant\Sextant.csproj" />
</ItemGroup>
</Project>
</Project>
Loading

0 comments on commit f98486a

Please sign in to comment.