Skip to content

Commit

Permalink
feat: To single package.
Browse files Browse the repository at this point in the history
  • Loading branch information
HavenDV committed Jun 28, 2023
1 parent 626f3d8 commit 262cb56
Show file tree
Hide file tree
Showing 17 changed files with 46 additions and 60 deletions.
2 changes: 1 addition & 1 deletion H.Ipc.sln
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "H.Ipc.Apps.Wpf", "src\apps\
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "H.Ipc.Generator.SnapshotTests", "src\tests\H.Ipc.Generator.SnapshotTests\H.Ipc.Generator.SnapshotTests.csproj", "{800AFF76-1B2B-41F6-8566-18E86D4F13F5}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "H.Ipc.Core", "src\libs\H.Ipc.Core\H.Ipc.Core.csproj", "{CB16ACB3-DDE0-40BE-9648-B7B0305B85F9}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "H.Ipc", "src\libs\H.Ipc\H.Ipc.csproj", "{CB16ACB3-DDE0-40BE-9648-B7B0305B85F9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@ This generator allows you to generate boilerplate code for [H.Pipes](https://git
Generation example: https://github.com/HavenDV/H.ProxyFactory/issues/7#issuecomment-1072287342

### Nuget
[![NuGet](https://img.shields.io/nuget/dt/H.Ipc.Generator.svg?style=flat-square&label=H.Ipc.Generator)](https://www.nuget.org/packages/H.Ipc.Generator/)
[![NuGet](https://img.shields.io/nuget/dt/H.Ipc.svg?style=flat-square&label=H.Ipc)](https://www.nuget.org/packages/H.Ipc/)
```
Install-Package H.Ipc.Generator
Install-Package H.Ipc.Core
Install-Package H.Pipes
```

### Usage
Expand Down
4 changes: 1 addition & 3 deletions src/apps/H.Ipc.Apps.Wpf/H.Ipc.Apps.Wpf.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="H.Formatters.System.Text.Json" Version="12.0.47" />
<PackageReference Include="H.Pipes.AccessControl" Version="2.0.47" />
<ProjectReference Include="..\..\libs\H.Ipc.Core\H.Ipc.Core.csproj" OutputItemType="Analyzer" />
<ProjectReference Include="..\..\libs\H.Ipc\H.Ipc.csproj" />
<ProjectReference Include="..\..\libs\H.Ipc.Generator\H.Ipc.Generator.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
</ItemGroup>

Expand Down
2 changes: 2 additions & 0 deletions src/libs/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<Project>

<Sdk Name="ViHo.PackAsAnalyzer" Version="1.0.1" />

<Import Project="..\Directory.Build.props" />

Expand Down
16 changes: 0 additions & 16 deletions src/libs/H.Ipc.Core/H.Ipc.Core.csproj

This file was deleted.

21 changes: 2 additions & 19 deletions src/libs/H.Ipc.Generator/H.Ipc.Generator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,18 @@

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<NoWarn>$(NoWarn);CA1014;CA1031</NoWarn>
</PropertyGroup>

<PropertyGroup Label="NuGet">
<NoWarn>$(NoWarn);NU5128</NoWarn>
<!--<DevelopmentDependency>true</DevelopmentDependency>-->
<IncludeBuildOutput>false</IncludeBuildOutput>
<IncludeSymbols>false</IncludeSymbols>
<IsPackable>false</IsPackable>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<Description>C# Source Generator for Inter-Process Communication.</Description>
<PackageTags>ipc;generator;source generator;pipes</PackageTags>
<NoWarn>$(NoWarn);CA1014;CA1031</NoWarn>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="H.Formatters.System.Text.Json" Version="12.0.47" />
<PackageReference Include="H.Pipes.AccessControl" Version="2.0.47" />
<PackageReference Include="IsExternalInit" Version="1.0.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.3.1" PrivateAssets="all" />
<PackageReference Include="H.Generators.Extensions" Version="1.14.2" PrivateAssets="all" />
<ProjectReference Include="..\H.Ipc.Core\H.Ipc.Core.csproj" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
<None Include="$(AssemblyName).props" Pack="true" PackagePath="build" />
<None Include="$(OutputPath)\$(AssemblyName).dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
<None Include="$(OutputPath)\H.Ipc.Core.dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
</ItemGroup>

</Project>
23 changes: 23 additions & 0 deletions src/libs/H.Ipc/H.Ipc.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net4.6.2</TargetFrameworks>
<RootNamespace>H.Ipc.Core</RootNamespace>
</PropertyGroup>

<PropertyGroup Label="NuGet">
<Description>Core library for Inter-Process Communication.</Description>
<PackageTags>ipc, generator, source generator, csharp 9</PackageTags>
</PropertyGroup>

<ItemGroup Label="Usings">
<Using Include="System.Diagnostics" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\H.Ipc.Generator\H.Ipc.Generator.csproj" ReferenceOutputAssembly="false" PackAsAnalyzer="true" />
<PackageReference Include="H.Formatters.System.Text.Json" Version="12.0.51" />
<PackageReference Include="H.Pipes.AccessControl" Version="2.0.51" />
</ItemGroup>

</Project>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0</TargetFrameworks>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>

<ItemGroup Label="Base packages">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.0.2" />
<PackageReference Include="MSTest.TestFramework" Version="3.0.2" />
<PackageReference Include="FluentAssertions" Version="6.10.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
<PackageReference Include="MSTest.TestAdapter" Version="3.0.4" />
<PackageReference Include="MSTest.TestFramework" Version="3.0.4" />
<PackageReference Include="FluentAssertions" Version="6.11.0" />
</ItemGroup>

<ItemGroup Label="GlobalUsings">
Expand All @@ -17,9 +17,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="H.Formatters.System.Text.Json" Version="12.0.47" />
<PackageReference Include="H.Pipes.AccessControl" Version="2.0.47" />
<ProjectReference Include="..\..\libs\H.Ipc.Core\H.Ipc.Core.csproj" OutputItemType="Analyzer" />
<ProjectReference Include="..\..\libs\H.Ipc\H.Ipc.csproj" />
<ProjectReference Include="..\..\libs\H.Ipc.Generator\H.Ipc.Generator.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class IpcGeneratorIntegrationTests
[TestMethod]
public async Task GeneratesIpcClientAndIpcServerCorrectly()
{
const string serverName = nameof(GeneratesIpcClientAndIpcServerCorrectly);
const string serverName = "H.Ipc";

// Server initialization
await using var server = new PipeServer<string>(serverName);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0</TargetFrameworks>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>

<ItemGroup Label="Base packages">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.0.2" />
<PackageReference Include="MSTest.TestFramework" Version="3.0.2" />
<PackageReference Include="FluentAssertions" Version="6.10.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
<PackageReference Include="MSTest.TestAdapter" Version="3.0.4" />
<PackageReference Include="MSTest.TestFramework" Version="3.0.4" />
<PackageReference Include="FluentAssertions" Version="6.11.0" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing.MSTest" Version="1.1.1" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.5.0" />
<PackageReference Include="Verify.MSTest" Version="19.10.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.6.0" />
<PackageReference Include="Verify.MSTest" Version="20.4.0" />
<PackageReference Include="Verify.SourceGenerators" Version="2.1.0" />
</ItemGroup>

Expand All @@ -24,7 +24,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\libs\H.Ipc.Core\H.Ipc.Core.csproj" />
<ProjectReference Include="..\..\libs\H.Ipc\H.Ipc.csproj" />
<ProjectReference Include="..\..\libs\H.Ipc.Generator\H.Ipc.Generator.csproj" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ public static class ModuleInitializer
[ModuleInitializer]
public static void Init()
{
VerifySourceGenerators.Enable();
VerifySourceGenerators.Initialize();
}
}

0 comments on commit 262cb56

Please sign in to comment.