Skip to content

Commit

Permalink
Merge pull request #53 from s2quake/chore/improve-msbuild-props
Browse files Browse the repository at this point in the history
Improve msbuild props for libplanet 5.1
  • Loading branch information
s2quake authored Jul 11, 2024
2 parents 8353292 + 6f16da2 commit ec9b194
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 25 deletions.
11 changes: 11 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
<Project>

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<CommandsDirectory>$(MSBuildThisFileDirectory).submodules\commands\</CommandsDirectory>
<CommunicationDirectory>$(MSBuildThisFileDirectory).submodules\communication\</CommunicationDirectory>
<ConfigurationDirectory>$(MSBuildThisFileDirectory).submodules\configurations\</ConfigurationDirectory>
<LibplanetDirectory>$(MSBuildThisFileDirectory).submodules\libplanet\</LibplanetDirectory>
<NoWarn>$(NoWarn);NU1902;NU1903</NoWarn>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556">
<PrivateAssets>all</PrivateAssets>
Expand Down
14 changes: 0 additions & 14 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,7 @@
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<CommandsDirectory>$(MSBuildThisFileDirectory)..\.commands\</CommandsDirectory>
<CommunicationDirectory>$(MSBuildThisFileDirectory)..\.communication\</CommunicationDirectory>
<ConfigurationDirectory>$(MSBuildThisFileDirectory)..\.configurations\</ConfigurationDirectory>
<LibplanetDirectory>$(MSBuildThisFileDirectory)..\.libplanet\</LibplanetDirectory>
<DebugType Condition="'$(_IsPublishing)'=='true'">none</DebugType>
</PropertyGroup>

<Target Name="DisplaySourceUsage" BeforeTargets="Build">
<Warning Condition="Exists('$(CommandsDirectory)')" Text="Commands is being referenced from this source.: $(CommandsDirectory)" />
<Warning Condition="Exists('$(CommunicationDirectory)')" Text="Communication is being referenced from this source.: $(CommunicationDirectory)" />
<Warning Condition="Exists('$(ConfigurationDirectory)')" Text="Configurations is being referenced from this source.: $(ConfigurationDirectory)" />
<Warning Condition="Exists('$(LibplanetDirectory)')" Text="Libplanet is being referenced from this source.: $(LibplanetDirectory)" />
</Target>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

<!-- $(LibplanetDirectory) exists. -->
<ItemGroup Condition="Exists('$(LibplanetDirectory)')">
<ProjectReference Include="$(LibplanetDirectory)Libplanet\Libplanet.csproj" />
<ProjectReference Include="$(LibplanetDirectory)Libplanet.Net\Libplanet.Net.csproj" />
<ProjectReference Include="$(LibplanetDirectory)Libplanet.Crypto\Libplanet.Crypto.csproj" />
<ProjectReference Include="$(LibplanetDirectory)Libplanet.Store\Libplanet.Store.csproj" />
<ProjectReference Include="$(LibplanetDirectory)Libplanet.RocksDBStore\Libplanet.RocksDBStore.csproj" />
<ProjectReference Include="$(LibplanetDirectory)src\Libplanet\Libplanet.csproj" />
<ProjectReference Include="$(LibplanetDirectory)src\Libplanet.Net\Libplanet.Net.csproj" />
<ProjectReference Include="$(LibplanetDirectory)src\Libplanet.Crypto\Libplanet.Crypto.csproj" />
<ProjectReference Include="$(LibplanetDirectory)src\Libplanet.Store\Libplanet.Store.csproj" />
<ProjectReference Include="$(LibplanetDirectory)src\Libplanet.RocksDBStore\Libplanet.RocksDBStore.csproj" />
</ItemGroup>

<!-- $(LibplanetDirectory) does not exist. -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

<!-- $(LibplanetDirectory) exists. -->
<ItemGroup Condition="Exists('$(LibplanetDirectory)')">
<ProjectReference Include="$(LibplanetDirectory)Libplanet.Net\Libplanet.Net.csproj" />
<ProjectReference Include="$(LibplanetDirectory)Libplanet.Crypto\Libplanet.Crypto.csproj" />
<ProjectReference Include="$(LibplanetDirectory)src\Libplanet.Net\Libplanet.Net.csproj" />
<ProjectReference Include="$(LibplanetDirectory)src\Libplanet.Crypto\Libplanet.Crypto.csproj" />
</ItemGroup>

<!-- $(LibplanetDirectory) does not exist. -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<!-- $(LibplanetDirectory) exists. -->
<ItemGroup Condition="Exists('$(LibplanetDirectory)')">
<ProjectReference Include="$(LibplanetDirectory)Libplanet.Explorer\Libplanet.Explorer.csproj" />
<ProjectReference Include="$(LibplanetDirectory)tools\Libplanet.Explorer\Libplanet.Explorer.csproj" />
</ItemGroup>

<!-- $(LibplanetDirectory) does not exist. -->
Expand Down
3 changes: 0 additions & 3 deletions test/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>
Expand Down

0 comments on commit ec9b194

Please sign in to comment.