Skip to content

Commit

Permalink
Enable Central Package Manager
Browse files Browse the repository at this point in the history
  • Loading branch information
rstm-sf committed Sep 3, 2023
1 parent cf08fed commit f5e7ae4
Show file tree
Hide file tree
Showing 14 changed files with 101 additions and 46 deletions.
38 changes: 38 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<CentralPackageTransitivePinningEnabled>false</CentralPackageTransitivePinningEnabled>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="ApprovalTests" Version="4.2.2" />
<PackageVersion Include="Avalonia" Version="[11.0.0,12.0.0)" />
<PackageVersion Include="Avalonia.Desktop" Version="11.0.0" />
<PackageVersion Include="Avalonia.Diagnostics" Version="11.0.0" />
<PackageVersion Include="Avalonia.ReactiveUI" Version="11.0.0" />
<PackageVersion Include="Avalonia.Themes.Fluent" Version="11.0.0" />
<PackageVersion Include="ChangelogAutomation.MSBuild" Version="2.0.0" />
<PackageVersion Include="coverlet.collector" Version="3.1.2" />
<PackageVersion Include="Foq" Version="1.8.0" />
<PackageVersion Include="FSharp.Core" Version="$(FSCorePackageVersion)" />
<PackageVersion Include="FSharp.Core.Fluent-4.0" Version="1.0.0.6" />
<PackageVersion Include="Microsoft.DotNet.GenAPI" Version="7.0.0-beta.23060.4" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="1.0.0" />
<PackageVersion Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.39" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.1" />
<PackageVersion Include="Nullable" Version="1.2.1" />
<PackageVersion Include="System.Reactive" Version="6.0.0" />
<PackageVersion Include="Verify.Xunit" Version="21.0.0" />
<PackageVersion Include="xunit" Version="2.5.0" />
<PackageVersion Include="xunit.abstractions" Version="2.0.3" />
<PackageVersion Include="xunit.assert" Version="2.5.0" />
<PackageVersion Include="xunit.core" Version="2.5.0" />
<PackageVersion Include="xunit.extensibility.core" Version="2.5.0" />
<PackageVersion Include="xunit.extensibility.execution" Version="2.5.0" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.0" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETFramework' ">
<PackageVersion Include="Avalonia.Direct2D1" Version="11.0.0" />
<PackageVersion Include="System.ValueTuple" Version="4.4.0" />
</ItemGroup>
</Project>
10 changes: 10 additions & 0 deletions NuGet.Config
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,14 @@
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" protocolVersion="3" /> <!-- TODO[#337]: Remove later -->
</packageSources>

<packageSourceMapping>
<packageSource key="nuget.org">
<package pattern="*" />
</packageSource>
<packageSource key="dotnet-eng">
<package pattern="Microsoft.DotNet.GenAPI" />
</packageSource>
</packageSourceMapping>

</configuration>
1 change: 1 addition & 0 deletions XamlMath.All.sln
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
NuGet.Config = NuGet.Config
Directory.Build.props = Directory.Build.props
.gitattributes = .gitattributes
Directory.Packages.props = Directory.Packages.props
EndProjectSection
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "WpfMath.Tests", "src\WpfMath.Tests\WpfMath.Tests.fsproj", "{F19E5FB1-EE6B-4A48-A522-41F30676BE41}"
Expand Down
12 changes: 6 additions & 6 deletions src/AvaloniaMath.ApiTest/AvaloniaMath.ApiTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.DotNet.GenAPI" Version="7.0.0-beta.23060.4" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageReference Include="Verify.Xunit" Version="19.7.1" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PackageReference Include="Microsoft.DotNet.GenAPI" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="Verify.Xunit" />
<PackageReference Include="xunit" />
<PackageReference Include="xunit.runner.visualstudio">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.1.2">
<PackageReference Include="coverlet.collector">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
10 changes: 5 additions & 5 deletions src/AvaloniaMath.Example/AvaloniaMath.Example.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
<AvaloniaResource Include="Assets\*" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia.Desktop" Version="11.0.0" />
<PackageReference Include="Avalonia.Diagnostics" Version="11.0.0" Condition=" '$(Configuration)' == 'Debug' " />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.0" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.0" />
<PackageReference Include="Avalonia.Desktop" />
<PackageReference Include="Avalonia.Diagnostics" Condition=" '$(Configuration)' == 'Debug' " />
<PackageReference Include="Avalonia.ReactiveUI" />
<PackageReference Include="Avalonia.Themes.Fluent" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETFramework' ">
<PackageReference Include="Avalonia.Direct2D1" Version="11.0.0" />
<PackageReference Include="Avalonia.Direct2D1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\AvaloniaMath\AvaloniaMath.csproj" />
Expand Down
8 changes: 4 additions & 4 deletions src/AvaloniaMath/AvaloniaMath.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
</AvaloniaResource>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia" Version="[11.0.0,12.0.0)" />
<PackageReference Include="Nullable" Version="1.2.1" PrivateAssets="All" />
<PackageReference Include="ChangelogAutomation.MSBuild" Version="2.0.0" PrivateAssets="All" />
<PackageReference Include="System.Reactive" Version="6.0.0" />
<PackageReference Include="Avalonia" />
<PackageReference Include="Nullable" PrivateAssets="All" />
<PackageReference Include="ChangelogAutomation.MSBuild" PrivateAssets="All" />
<PackageReference Include="System.Reactive" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\XamlMath.Shared\XamlMath.Shared.csproj" />
Expand Down
2 changes: 1 addition & 1 deletion src/Tool.TTFMetrics/Tool.TTFMetrics.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.39"/>
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" />
</ItemGroup>

</Project>
10 changes: 5 additions & 5 deletions src/WpfMath.ApiTest/WpfMath.ApiTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.DotNet.GenAPI" Version="7.0.0-beta.23060.4" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PackageReference Include="Microsoft.DotNet.GenAPI" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="xunit" />
<PackageReference Include="xunit.runner.visualstudio">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.1.2">
<PackageReference Include="coverlet.collector">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
4 changes: 2 additions & 2 deletions src/WpfMath.Example/WpfMath.Example.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<ProjectReference Include="../WpfMath/WpfMath.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.39" />
<PackageReference Include="Nullable" Version="1.2.1">
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" />
<PackageReference Include="Nullable">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
6 changes: 3 additions & 3 deletions src/WpfMath.Tests/DefaultTexFontTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ type DefaultTexFontTests() =

[<Fact>]
member _.``GetCharInfo(char, string, TexStyle) returns a CharInfo for existing character``() =
Assert.NotNull <| font.GetCharInfo('x', "text", TexStyle.Text)
Assert.NotNull(font.GetCharInfo('x', "text", TexStyle.Text))

[<Fact>]
member _.``GetCharInfo(char, string, TexStyle) throws a TextStyleMappingNotFoundException for unknown text style``() =
Assert.IsType<TextStyleMappingNotFoundException>(font.GetCharInfo('x', "unknownStyle", TexStyle.Text).Error)

[<Fact>]
member _.``GetCharInfo(string, TexStyle) returns a CharInfo for existing symbol``() =
Assert.NotNull <| font.GetCharInfo("sqrt", TexStyle.Text)
Assert.NotNull(font.GetCharInfo("sqrt", TexStyle.Text))

[<Fact>]
member _.``GetCharInfo(string, TexStyle) throws a SymbolMappingNotFoundException for unknown symbol``() =
Expand All @@ -30,7 +30,7 @@ type DefaultTexFontTests() =
[<Fact>]
member _.``GetCharInfo(CharFont, TexStyle) returns a CharInfo for existing symbol``() =
let char = CharFont('x', 1)
Assert.NotNull <| font.GetCharInfo(char, TexStyle.Text)
Assert.NotNull(font.GetCharInfo(char, TexStyle.Text))

[<Fact>]
member _.``GetCharInfo(CharFont, TexStyle) throws a TexCharacterMappingNotFoundException for unknown character``() =
Expand Down
30 changes: 18 additions & 12 deletions src/WpfMath.Tests/WpfMath.Tests.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,30 @@
<UseWpf>true</UseWpf>
<Deterministic>false</Deterministic>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
<LangVersion>preview</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ApprovalTests" Version="4.2.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageReference Include="Foq" Version="1.8.0" />
<PackageReference Include="FSharp.Core.Fluent-4.0" Version="1.0.0.6" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.abstractions" Version="2.0.3" />
<PackageReference Include="xunit.assert" Version="2.4.1" />
<PackageReference Include="xunit.core" Version="2.4.1" />
<PackageReference Include="xunit.extensibility.core" Version="2.4.1" />
<PackageReference Include="xunit.extensibility.execution" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
<PackageReference Include="ApprovalTests" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="Foq" />
<PackageReference Include="FSharp.Core" />
<PackageReference Include="FSharp.Core.Fluent-4.0" />
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="xunit" />
<PackageReference Include="xunit.abstractions" />
<PackageReference Include="xunit.assert" />
<PackageReference Include="xunit.core" />
<PackageReference Include="xunit.extensibility.core" />
<PackageReference Include="xunit.extensibility.execution" />
<PackageReference Include="xunit.runner.visualstudio">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<ProjectReference Include="../WpfMath/WpfMath.csproj" />
</ItemGroup>
<ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net470'))">
<PackageReference Include="System.ValueTuple" />
</ItemGroup>
<ItemGroup>
<Compile Include="ApprovalTestUtils.fs" />
<Compile Include="Utils.fs" />
Expand All @@ -46,4 +51,5 @@
<Compile Include="WpfBrushTests.fs" />
<None Include="TestResults/*.txt" />
</ItemGroup>

</Project>
12 changes: 6 additions & 6 deletions src/WpfMath/WpfMath.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,22 @@
</PropertyGroup>

<ItemGroup>
<Resource Include="..\..\fonts\*.ttf" LinkBase="Fonts"/>
<Resource Include="..\..\fonts\*.ttf" LinkBase="Fonts" />
<None Include="..\..\fonts\LICENSES.md" Pack="true" PackagePath="\FONT-LICENSES.md" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
<PackageReference Include="Nullable" Version="1.2.1" PrivateAssets="All"/>
<PackageReference Include="ChangelogAutomation.MSBuild" Version="2.0.0" PrivateAssets="All"/>
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
<PackageReference Include="Nullable" PrivateAssets="All" />
<PackageReference Include="ChangelogAutomation.MSBuild" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\XamlMath.Shared\XamlMath.Shared.csproj"/>
<ProjectReference Include="..\XamlMath.Shared\XamlMath.Shared.csproj" />
</ItemGroup>

<ItemGroup>
<InternalsVisibleTo Include="$(AssemblyName).Tests"/>
<InternalsVisibleTo Include="$(AssemblyName).Tests" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Verify.Xunit" Version="19.7.1" />
<PackageReference Include="Verify.Xunit" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion src/XamlMath.Shared/XamlMath.Shared.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="ChangelogAutomation.MSBuild" Version="2.0.0" PrivateAssets="All" />
<PackageReference Include="ChangelogAutomation.MSBuild" PrivateAssets="All" />
</ItemGroup>
</Project>

0 comments on commit f5e7ae4

Please sign in to comment.