Skip to content

Commit

Permalink
Merge pull request #696 from Cysharp/feature/CleanupProjects
Browse files Browse the repository at this point in the history
Cleanup project settings
  • Loading branch information
mayuki authored Oct 25, 2023
2 parents cd5f4a3 + dd2d80a commit 0e9d0bd
Show file tree
Hide file tree
Showing 11 changed files with 82 additions and 137 deletions.
10 changes: 3 additions & 7 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<VersionPrefix>5.1.8</VersionPrefix>
</PropertyGroup>

<!-- NuGet Packaging -->
<!-- NuGet Packaging -->
<PropertyGroup>
<PackageVersion>$(Version)</PackageVersion>
<Company>Cysharp</Company>
<Authors>Cysharp</Authors>
Expand All @@ -22,12 +24,6 @@
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>

<!-- Expose package path to the solution (e.g. $(PkgSystem_Text_Json))-->
<!-- https://learn.microsoft.com/en-us/nuget/consume-packages/package-references-in-project-files#generatepathproperty -->
<ItemDefinitionGroup>
<PackageReference GeneratePathProperty="true" />
</ItemDefinitionGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="all"/>
</ItemGroup>
Expand Down
9 changes: 9 additions & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
<Project>
<Import Project="..\Directory.Build.props" />

<PropertyGroup>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>$(MSBuildProjectDirectory)\..\MagicOnion\opensource.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

<!-- Prevent local path leakage by artifacts -->
<PropertyGroup>
<RepoRoot>$(MSBuildThisFileDirectory)</RepoRoot>
<PathMap>$(RepoRoot)=.</PathMap>
</PropertyGroup>

<ItemGroup>
<None Include="$(MSBuildProjectDirectory)\..\MagicOnion\Icon.png" Pack="true" PackagePath="/" />
</ItemGroup>
</Project>
8 changes: 1 addition & 7 deletions src/MagicOnion.Abstractions/MagicOnion.Abstractions.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>8.0</LangVersion>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\MagicOnion\opensource.snk</AssemblyOriginatorKeyFile>
<DefineConstants>NON_UNITY</DefineConstants>
<DefineConstants>$(DefineConstants);NON_UNITY</DefineConstants>

<PackageId>MagicOnion.Abstractions</PackageId>
<Description>MagicOnion interfaces and abstractions for server and client.
Expand All @@ -21,10 +19,6 @@ MagicOnion.IgnoreAttribute</Description>
<PackageReference Include="MessagePack" />
</ItemGroup>

<ItemGroup>
<None Include="..\MagicOnion\Icon.png" Pack="true" PackagePath="/" />
</ItemGroup>

<!-- Copy files for unity MagicOnion -->
<PropertyGroup>
<DestinationRoot>$(ProjectDir)..\MagicOnion.Client.Unity\Assets\Scripts\MagicOnion\MagicOnion.Abstractions\</DestinationRoot>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>

<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\MagicOnion\opensource.snk</AssemblyOriginatorKeyFile>

<LangVersion>latest</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
Expand All @@ -31,10 +28,6 @@
</PackageReference>
</ItemGroup>

<ItemGroup>
<None Include="..\MagicOnion\Icon.png" Pack="true" PackagePath="/" />
</ItemGroup>

<ItemGroup>
<Service Include="{508349b6-6b84-4df5-91f0-309beebad82d}" />
</ItemGroup>
Expand Down
10 changes: 1 addition & 9 deletions src/MagicOnion.Client/MagicOnion.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,9 @@

<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0;net7.0</TargetFrameworks>

<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\MagicOnion\opensource.snk</AssemblyOriginatorKeyFile>
<LangVersion>8.0</LangVersion>
<!--<nullable>enable</nullable>-->

<DefineConstants>TRACE;NON_UNITY</DefineConstants>
<DefineConstants>$(DefineConstants);NON_UNITY</DefineConstants>

<!-- NuGet -->
<PackageId>MagicOnion.Client</PackageId>
Expand All @@ -32,10 +28,6 @@
<None Include="..\MagicOnion.Client.SourceGenerator\bin\$(Configuration)\netstandard2.0\MagicOnion.Client.SourceGenerator.dll" PackagePath="analyzers\dotnet\roslyn4.3\cs" Pack="true" Visible="false" />
</ItemGroup>

<ItemGroup>
<None Include="..\MagicOnion\Icon.png" Pack="true" PackagePath="/" />
</ItemGroup>

<!-- Sync codes: MagicOnion.Client for Unity -->
<PropertyGroup>
<DestinationRoot>$(ProjectDir)..\MagicOnion.Client.Unity\Assets\Scripts\MagicOnion\MagicOnion.Client\</DestinationRoot>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
<PropertyGroup>
<TargetFrameworks>netstandard2.1;net7.0</TargetFrameworks>
<LangVersion>latest</LangVersion>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\MagicOnion\opensource.snk</AssemblyOriginatorKeyFile>
<ImplicitUsings>enable</ImplicitUsings>
<nullable>enable</nullable>

Expand All @@ -22,10 +20,6 @@
<ProjectReference Include="..\MagicOnion.Shared\MagicOnion.Shared.csproj" />
</ItemGroup>

<ItemGroup>
<None Include="..\MagicOnion\Icon.png" Pack="true" PackagePath="/" />
</ItemGroup>

<ItemGroup>
<Compile Update="DynamicArgumentTupleMemoryPackFormatter.cs">
<DependentUpon>DynamicArgumentTupleMemoryPackFormatter.tt</DependentUpon>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,43 +1,36 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<OutputType>Library</OutputType>
<LangVersion>default</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\MagicOnion\opensource.snk</AssemblyOriginatorKeyFile>
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<NoWarn>1701;1702;1705;1591</NoWarn>
<DefineConstants>NON_UNITY</DefineConstants>
<!--<nullable>enable</nullable>-->

<!-- NuGet -->
<PackageId>MagicOnion.Server.HttpGateway</PackageId>
<Description>HTTP1 JSON Gateway and Swagger Integration for MagicOnion.</Description>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" />
</ItemGroup>

<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\MagicOnion.Client\MagicOnion.Client.csproj" />
<ProjectReference Include="..\MagicOnion.Server\MagicOnion.Server.csproj" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="Swagger\SwaggerUI\*" />
</ItemGroup>

<ItemGroup>
<None Include="..\MagicOnion\Icon.png" Pack="true" PackagePath="/" />
</ItemGroup>
<PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<OutputType>Library</OutputType>
<LangVersion>default</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>

<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<NoWarn>1701;1702;1705;1591</NoWarn>
<DefineConstants>$(DefineConstants);NON_UNITY</DefineConstants>
<!--<nullable>enable</nullable>-->

<!-- NuGet -->
<PackageId>MagicOnion.Server.HttpGateway</PackageId>
<Description>HTTP1 JSON Gateway and Swagger Integration for MagicOnion.</Description>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" />
</ItemGroup>

<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\MagicOnion.Client\MagicOnion.Client.csproj" />
<ProjectReference Include="..\MagicOnion.Server\MagicOnion.Server.csproj" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="Swagger\SwaggerUI\*" />
</ItemGroup>

</Project>
46 changes: 17 additions & 29 deletions src/MagicOnion.Server.Redis/MagicOnion.Server.Redis.csproj
Original file line number Diff line number Diff line change
@@ -1,36 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<OutputType>Library</OutputType>
<LangVersion>default</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\MagicOnion\opensource.snk</AssemblyOriginatorKeyFile>
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<NoWarn>1701;1702;1705;1591</NoWarn>
<DefineConstants>NON_UNITY</DefineConstants>
<Company>Cysharp</Company>
<PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<OutputType>Library</OutputType>
<LangVersion>default</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<NoWarn>$(NoWarn);1701;1702;1705;1591</NoWarn>
<DefineConstants>$(DefineConstants);NON_UNITY</DefineConstants>

<!-- NuGet -->
<PackageId>MagicOnion.Server.Redis</PackageId>
<Description>Redis backplane for MagicOnion.</Description>
</PropertyGroup>
<!-- NuGet -->
<PackageId>MagicOnion.Server.Redis</PackageId>
<Description>Redis backplane for MagicOnion.</Description>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="MessagePack" />
<PackageReference Include="StackExchange.Redis" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="StackExchange.Redis" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\MagicOnion.Server\MagicOnion.Server.csproj" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\MagicOnion.Server\MagicOnion.Server.csproj" />
</ItemGroup>

<ItemGroup>
<None Include="..\MagicOnion\Icon.png" Pack="true" PackagePath="/" />
</ItemGroup>
</Project>
9 changes: 2 additions & 7 deletions src/MagicOnion.Server/MagicOnion.Server.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\MagicOnion\opensource.snk</AssemblyOriginatorKeyFile>

<ImplicitUsings>enable</ImplicitUsings>
<nullable>enable</nullable>
<DefineConstants>TRACE;NON_UNITY</DefineConstants>
<DefineConstants>$(DefineConstants);NON_UNITY</DefineConstants>
<LangVersion>default</LangVersion>

<!-- NuGet -->
Expand All @@ -24,10 +23,6 @@
<ProjectReference Include="..\MagicOnion.Shared\MagicOnion.Shared.csproj" />
</ItemGroup>

<ItemGroup>
<None Include="..\MagicOnion\Icon.png" Pack="true" PackagePath="/" />
</ItemGroup>

<ItemGroup>
<None Update="DynamicArgumentTuple.tt">
<LastGenOutput>DynamicArgumentTuple.cs</LastGenOutput>
Expand Down
8 changes: 1 addition & 7 deletions src/MagicOnion.Shared/MagicOnion.Shared.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\MagicOnion\opensource.snk</AssemblyOriginatorKeyFile>
<!--<nullable>enable</nullable>-->
<DefineConstants>TRACE;NON_UNITY</DefineConstants>
<DefineConstants>$(DefineConstants);NON_UNITY</DefineConstants>

<RootNamespace>MagicOnion</RootNamespace>
<Description>Provides shared classes and interfaces used by MagicOnion server and client. $(MagicOnionPackageDescription)</Description>
Expand All @@ -20,10 +18,6 @@
<ProjectReference Include="..\MagicOnion.Abstractions\MagicOnion.Abstractions.csproj" />
</ItemGroup>

<ItemGroup>
<None Include="..\MagicOnion\Icon.png" Pack="true" PackagePath="/" />
</ItemGroup>

<!-- T4 -->
<ItemGroup>
<None Update="DynamicArgumentTuple.tt">
Expand Down
33 changes: 15 additions & 18 deletions src/MagicOnion/MagicOnion.csproj
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<OutputType>Library</OutputType>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
<AssemblyOriginatorKeyFile>opensource.snk</AssemblyOriginatorKeyFile>
<Company>Cysharp</Company>
<PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<OutputType>Library</OutputType>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>

<!-- NuGet -->
<PackageId>MagicOnion</PackageId>
<Description>$(MagicOnionPackageDescription) This package is meta package that includes MagicOnion.Server and MagicOnion.Client.</Description>
<!-- NuGet -->
<PackageId>MagicOnion</PackageId>
<Description>$(MagicOnionPackageDescription) This package is meta package that includes MagicOnion.Server and MagicOnion.Client.</Description>

<!-- This is only a metapackage -->
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<IncludeBuildOutput>false</IncludeBuildOutput>
<NoWarn>$(NoWarn);CS2008</NoWarn>
</PropertyGroup>
<!-- This is only a metapackage -->
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<IncludeBuildOutput>false</IncludeBuildOutput>
<NoWarn>$(NoWarn);CS2008</NoWarn>
</PropertyGroup>

<ItemGroup>
<None Include="Icon.png" Pack="true" PackagePath="/" />
<None Include="lib\**\*.*" Pack="true" PackagePath="lib" />
</ItemGroup>
<ItemGroup>
<None Include="lib\**\*.*" Pack="true" PackagePath="lib" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\MagicOnion.Server\MagicOnion.Server.csproj" />
Expand Down

0 comments on commit 0e9d0bd

Please sign in to comment.