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

chore: Added IsXampleProject build property #66

Merged
merged 1 commit into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<AssemblyAttribute
Include="System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute"
Condition=" '$(IsTestableProject)' == 'true' and $([MSBuild]::IsTargetFrameworkCompatible($(TargetFramework), 'net5.0')) == 'true' " />
Condition=" ('$(IsTestableProject)' == 'true' or '$(IsXampleProject)' != 'true') and $([MSBuild]::IsTargetFrameworkCompatible($(TargetFramework), 'net5.0')) == 'true' " />
</ItemGroup>

</Project>
2 changes: 2 additions & 0 deletions src/NetEvolve.Defaults/build/SupportGeneral.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
<PropertyGroup Label="Project categorisation">
<IsTestableProject>false</IsTestableProject>
<IsTestableProject Condition=" $(MSBuildProjectName.Contains('.Tests.')) ">true</IsTestableProject>
<IsXampleProject>false</IsXampleProject>
<IsXampleProject Condition=" $(MSBuildProjectName.Contains('.Xample')) or $(MSBuildProjectName.StartsWith('Xample.')) ">true</IsXampleProject>
</PropertyGroup>

<PropertyGroup Label="General Configurations">
Expand Down
7 changes: 6 additions & 1 deletion src/NetEvolve.Defaults/build/SupportGeneral.targets
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,14 @@
<InternalsVisibleTo Include="$(MSBuildProjectName).Tests.Integration" />
</ItemGroup>

<PropertyGroup Condition=" '$(IsTestableProject)' == 'false' ">
<PropertyGroup Condition=" '$(IsTestableProject)' == 'false' and '$(IsXampleProject)' == 'false' ">
<IsPackable>true</IsPackable>
<IsTestProject>false</IsTestProject>
</PropertyGroup>

<PropertyGroup Condition=" '$(IsXampleProject)' == 'true' ">
<IsPackable>false</IsPackable>
<IsTestProject>false</IsTestProject>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project TreatAsLocalProperty="_SolutionLicense;_ProjectReadme;_SolutionReadme">

<PropertyGroup Label="Package Information" Condition=" '$(IsTestableProject)' != 'true' ">
<PropertyGroup Label="Package Information" Condition=" '$(IsTestableProject)' != 'true' and '$(IsXampleProject)' != 'true' ">
<PackageId Condition=" '$(PackageId)' == '' ">$(MSBuildProjectName)</PackageId>
<Title Condition=" '$(Title)' == '' ">$(MSBuildProjectName)</Title>

Expand All @@ -20,11 +20,11 @@
<GeneratePackageOnBuild Condition=" '$(GeneratePackageOnBuild)' == '' ">true</GeneratePackageOnBuild>
</PropertyGroup>

<PropertyGroup Label="NuGet Package Defaults" Condition=" '$(IsTestableProject)' != 'true' or '$(DisableNetEvolve)' != 'true' ">
<PropertyGroup Label="NuGet Package Defaults" Condition=" '$(IsTestableProject)' != 'true' and '$(IsXampleProject)' != 'true' and '$(DisableNetEvolve)' != 'true' ">
<PackageTags>netevolve;$(PackageTags)</PackageTags>
</PropertyGroup>

<ItemGroup Label="Package Files" Condition=" '$(IsTestableProject)' != 'true' ">
<ItemGroup Label="Package Files" Condition=" '$(IsTestableProject)' != 'true' and '$(IsXampleProject)' != 'true' ">
<_SolutionLicense Include="LICENSE" Condition="Exists('LICENSE')" />
<_SolutionLicense Include="$(SolutionDir)LICENSE" Condition="@(_SolutionLicense) == '' and Exists('$(SolutionDir)LICENSE')" />
<None Include="@(_SolutionLicense)" Pack="true" PackagePath="" Visible="false" Condition="Exists(@(_SolutionLicense))" />
Expand Down
Loading