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

Change common.props to Build Directory File and migrate to central package management #276

Merged
merged 6 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from 3 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
8 changes: 4 additions & 4 deletions Akka.Persistence.Redis.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29806.167
# Visual Studio Version 17
VisualStudioVersion = 17.7.34003.232
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution items", "Solution items", "{EB67BFB9-7589-469F-B0E0-6DDFC0032E67}"
ProjectSection(SolutionItems) = preProject
Expand All @@ -10,8 +10,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution items", "Solution
build.fsx = build.fsx
build.ps1 = build.ps1
build.sh = build.sh
src\common.props = src\common.props
README.md = README.md
src\Directory.Build.props = src\Directory.Build.props
RELEASE_NOTES.md = RELEASE_NOTES.md
EndProjectSection
EndProject
Expand All @@ -29,7 +29,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Akka.Persistence.Redis.Clus
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "benchmarks", "benchmarks", "{DA31E2A8-AE1A-474D-843C-1B6848B921E2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Akka.Persistence.Redis.Benchmark.DockerTests", "src\benchmarks\Akka.Persistence.Redis.Benchmark.DockerTests\Akka.Persistence.Redis.Benchmark.DockerTests.csproj", "{BFBB3933-E8FC-4574-8D60-E6FA6BEABAE9}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Akka.Persistence.Redis.Benchmark.DockerTests", "src\benchmarks\Akka.Persistence.Redis.Benchmark.DockerTests\Akka.Persistence.Redis.Benchmark.DockerTests.csproj", "{BFBB3933-E8FC-4574-8D60-E6FA6BEABAE9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
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" protocolVersion="3"/>
</packageSources>
<packageSourceMapping>
<!-- key value for <packageSource> should match key values from <packageSources> element -->
<packageSource key="nuget.org">
<package pattern="*"/>
</packageSource>
</packageSourceMapping>
</configuration>
4 changes: 2 additions & 2 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ Target "Clean" (fun _ ->
)

Target "AssemblyInfo" (fun _ ->
XmlPokeInnerText "./src/common.props" "//Project/PropertyGroup/VersionPrefix" releaseNotes.AssemblyVersion
XmlPokeInnerText "./src/common.props" "//Project/PropertyGroup/PackageReleaseNotes" (releaseNotes.Notes |> String.concat "\n")
XmlPokeInnerText "./src/Directory.Build.props" "//Project/PropertyGroup/VersionPrefix" releaseNotes.AssemblyVersion
XmlPokeInnerText "./src/Directory.Build.props" "//Project/PropertyGroup/PackageReleaseNotes" (releaseNotes.Notes |> String.concat "\n")
)

Target "Build" (fun _ ->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\common.props" />

<PropertyGroup>
<AssemblyTitle>Akka.Persistence.Redis.Cluster.Tests</AssemblyTitle>
<TargetFrameworks>$(NetFrameworkTestVersion);$(NetCoreTestVersion)</TargetFrameworks>
<TargetFrameworks>$(NetFrameworkTestVersion);$(NetTestVersion)</TargetFrameworks>
<IsPackable>false</IsPackable>
</PropertyGroup>

<PropertyGroup Condition="'$(OS)' == 'Windows_NT'">
<TargetFrameworks>$(NetFrameworkTestVersion);$(NetCoreTestVersion)</TargetFrameworks>
<TargetFrameworks>$(NetFrameworkTestVersion);$(NetTestVersion)</TargetFrameworks>
</PropertyGroup>

<!-- disable .NET Framework (Mono) on Linux-->
<PropertyGroup Condition="'$(OS)' != 'Windows_NT'">
<TargetFrameworks>$(NetCoreTestVersion)</TargetFrameworks>
<TargetFrameworks>$(NetTestVersion)</TargetFrameworks>
</PropertyGroup>


Expand All @@ -22,22 +20,22 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(TestSdkVersion)" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<!-- Needed by Redis to run -->
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
<PackageReference Include="Docker.DotNet" Version="$(DockerVersion)" />
<PackageReference Include="xunit" Version="$(XunitVersion)" />
<PackageReference Include="xunit.runner.visualstudio" Version="$(XunitVersion)">
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" />
<PackageReference Include="Docker.DotNet" />
<PackageReference Include="xunit" />
<PackageReference Include="xunit.runner.visualstudio">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Akka.TestKit" Version="$(AkkaVersion)" />
<PackageReference Include="Akka.Persistence.TCK" Version="$(AkkaVersion)" />
<PackageReference Include="Akka.TestKit.Xunit2" Version="$(AkkaVersion)" />
<PackageReference Include="Akka.Streams.TestKit" Version="$(AkkaVersion)" />
<PackageReference Include="Akka.TestKit" />
<PackageReference Include="Akka.Persistence.TCK" />
<PackageReference Include="Akka.TestKit.Xunit2" />
<PackageReference Include="Akka.Streams.TestKit" />
</ItemGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\common.props" />

<PropertyGroup>
<AssemblyTitle>Akka.Persistence.Redis.Tests</AssemblyTitle>
<TargetFrameworks>$(NetFrameworkTestVersion);$(NetCoreTestVersion)</TargetFrameworks>
<TargetFrameworks>$(NetFrameworkTestVersion);$(NetTestVersion)</TargetFrameworks>
<IsPackable>false</IsPackable>
</PropertyGroup>

<PropertyGroup Condition="'$(OS)' == 'Windows_NT'">
<TargetFrameworks>$(NetFrameworkTestVersion);$(NetCoreTestVersion)</TargetFrameworks>
<TargetFrameworks>$(NetFrameworkTestVersion);$(NetTestVersion)</TargetFrameworks>
</PropertyGroup>

<!-- disable .NET Framework (Mono) on Linux-->
<PropertyGroup Condition="'$(OS)' != 'Windows_NT'">
<TargetFrameworks>$(NetCoreTestVersion)</TargetFrameworks>
<TargetFrameworks>$(NetTestVersion)</TargetFrameworks>
</PropertyGroup>


Expand All @@ -22,23 +20,23 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(TestSdkVersion)" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<!-- Needed by Redis to run -->
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
<PackageReference Include="Docker.DotNet" Version="$(DockerVersion)" />
<PackageReference Include="xunit" Version="$(XunitVersion)" />
<PackageReference Include="xunit.runner.visualstudio" Version="$(XunitVersion)">
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" />
<PackageReference Include="Docker.DotNet" />
<PackageReference Include="xunit" />
<PackageReference Include="xunit.runner.visualstudio" >
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Akka.Cluster.Sharding" Version="$(AkkaVersion)" />
<PackageReference Include="Akka.TestKit" Version="$(AkkaVersion)" />
<PackageReference Include="Akka.Persistence.TCK" Version="$(AkkaVersion)" />
<PackageReference Include="Akka.TestKit.Xunit2" Version="$(AkkaVersion)" />
<PackageReference Include="Akka.Streams.TestKit" Version="$(AkkaVersion)" />
<PackageReference Include="Akka.Cluster.Sharding" />
<PackageReference Include="Akka.TestKit" />
<PackageReference Include="Akka.Persistence.TCK" />
<PackageReference Include="Akka.TestKit.Xunit2" />
<PackageReference Include="Akka.Streams.TestKit" />
</ItemGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
Expand Down
16 changes: 7 additions & 9 deletions src/Akka.Persistence.Redis/Akka.Persistence.Redis.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\common.props" />

<PropertyGroup>
<AssemblyTitle>Akka.Persistence.Redis</AssemblyTitle>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<TargetFramework>$(NetStandardVersion)</TargetFramework>
<PackageReadmeFile>README.md</PackageReadmeFile>
<LangVersion>7.1</LangVersion>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<LangVersion>7.1</LangVersion>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
</PropertyGroup>

Expand All @@ -16,10 +14,10 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Akka" Version="$(AkkaVersion)" />
<PackageReference Include="Akka.Persistence" Version="$(AkkaVersion)" />
<PackageReference Include="Akka.Persistence.Query" Version="$(AkkaVersion)" />
<PackageReference Include="Akka.Streams" Version="$(AkkaVersion)" />
<PackageReference Include="StackExchange.Redis" Version="$(RedisVersion)" />
<PackageReference Include="Akka" />
<PackageReference Include="Akka.Persistence" />
<PackageReference Include="Akka.Persistence.Query" />
<PackageReference Include="Akka.Streams" />
<PackageReference Include="StackExchange.Redis" />
</ItemGroup>
</Project>
6 changes: 3 additions & 3 deletions src/common.props → src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,16 @@ Other Changes**
<AkkaVersion>1.5.8</AkkaVersion>
<RedisVersion>2.6.111</RedisVersion>
<DockerVersion>3.125.15</DockerVersion>
<NetCoreTestVersion>netcoreapp3.1</NetCoreTestVersion>
<NetTestVersion>net7.0</NetTestVersion>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sense check here - Instead of maintaining testing against netcoreapp 3.1 I changed it to just using net7 and renamed the property. This is more inline with what is done on the main Akka project

<NetStandardVersion>netstandard2.0</NetStandardVersion>
<NetFrameworkTestVersion>net461</NetFrameworkTestVersion>
<NetFrameworkTestVersion>net471</NetFrameworkTestVersion>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here also upgraded framework target to match the main project - Not sure if there are any implications.

</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
</PropertyGroup>
<!-- SourceLink support for all Akka.NET projects -->
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
<None Include="$(MSBuildThisFileDirectory)\..\README.md" Pack="true" Visible="false" PackagePath="\" />
</ItemGroup>
<PropertyGroup>
Expand Down
39 changes: 39 additions & 0 deletions src/Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<!-- Library dependencies -->
<ItemGroup>
<PackageVersion Include="Akka" Version="$(AkkaVersion)" />
<PackageVersion Include="Akka.Persistence" Version="$(AkkaVersion)" />
<PackageVersion Include="Akka.Persistence.Query" Version="$(AkkaVersion)" />
<PackageVersion Include="Akka.Streams" Version="$(AkkaVersion)" />
<PackageVersion Include="StackExchange.Redis" Version="$(RedisVersion)" />
</ItemGroup>
<!-- Test dependencies -->
<ItemGroup>
<PackageVersion Include="Akka.Cluster.Sharding" Version="$(AkkaVersion)" />
<PackageVersion Include="Akka.TestKit" Version="$(AkkaVersion)" />
<PackageVersion Include="Akka.Persistence.TCK" Version="$(AkkaVersion)" />
<PackageVersion Include="Akka.TestKit.Xunit2" Version="$(AkkaVersion)" />
<PackageVersion Include="Akka.Streams.TestKit" Version="$(AkkaVersion)" />

<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="$(TestSdkVersion)" />
<!-- Needed by Redis to run -->
<PackageVersion Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
<PackageVersion Include="Docker.DotNet" Version="$(DockerVersion)" />
<PackageVersion Include="xunit" Version="$(XunitVersion)" />
<PackageVersion Include="xunit.runner.visualstudio" Version="$(XunitVersion)" />

<PackageVersion Include="coverlet.collector" Version="3.2.0" />
<PackageVersion Include="JetBrains.dotMemoryUnit" Version="3.2.20220510" />
</ItemGroup>
<!--Custom Serialization Examples-->
<ItemGroup>
<PackageVersion Include="MessagePack" Version="2.5.108" />
</ItemGroup>
<!-- SourceLink support for all Akka.NET projects -->
<ItemGroup>
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="1.1.1 "/>
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>$(NetCoreTestVersion)</TargetFramework>
<TargetFramework>$(NetTestVersion)</TargetFramework>
<RootNamespace>Akka.Persistence.Redis.BenchmarkTests.Docker</RootNamespace>
<IsPackable>false</IsPackable>
</PropertyGroup>
Expand All @@ -11,18 +10,18 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(TestSdkVersion)" />
<PackageReference Include="Docker.DotNet" Version="$(DockerVersion)" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="Docker.DotNet" />
<!-- Needed by Redis to run -->
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
<PackageReference Include="Akka" Version="$(AkkaVersion)" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="JetBrains.dotMemoryUnit" Version="3.2.20220510" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.2">
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" />
<PackageReference Include="Akka" />
<PackageReference Include="JetBrains.dotMemoryUnit" />
<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.2.0">
<PackageReference Include="coverlet.collector">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>$(NetCoreTestVersion)</TargetFrameworks>
<TargetFrameworks>$(NetTestVersion)</TargetFrameworks>
<ServerGarbageCollection>true</ServerGarbageCollection>
<IsPackable>false</IsPackable>
</PropertyGroup>
Expand All @@ -17,7 +15,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="MessagePack" Version="2.5.108" />
<PackageReference Include="MessagePack" />
</ItemGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == '$(NetFrameworkTestVersion)' ">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>$(NetCoreTestVersion)</TargetFrameworks>
<TargetFrameworks>$(NetTestVersion)</TargetFrameworks>
<ServerGarbageCollection>true</ServerGarbageCollection>
<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down