Skip to content

Commit a548056

Browse files
authored
chore: Added IsXampleProject build property (#66)
1 parent bf4c2a3 commit a548056

4 files changed

+12
-5
lines changed

src/NetEvolve.Defaults/build/SupportAssemblyAttributes.targets

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

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

1313
</Project>

src/NetEvolve.Defaults/build/SupportGeneral.props

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
<PropertyGroup Label="Project categorisation">
44
<IsTestableProject>false</IsTestableProject>
55
<IsTestableProject Condition=" $(MSBuildProjectName.Contains('.Tests.')) ">true</IsTestableProject>
6+
<IsXampleProject>false</IsXampleProject>
7+
<IsXampleProject Condition=" $(MSBuildProjectName.Contains('.Xample')) or $(MSBuildProjectName.StartsWith('Xample.')) ">true</IsXampleProject>
68
</PropertyGroup>
79

810
<PropertyGroup Label="General Configurations">

src/NetEvolve.Defaults/build/SupportGeneral.targets

+6-1
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,14 @@
66
<InternalsVisibleTo Include="$(MSBuildProjectName).Tests.Integration" />
77
</ItemGroup>
88

9-
<PropertyGroup Condition=" '$(IsTestableProject)' == 'false' ">
9+
<PropertyGroup Condition=" '$(IsTestableProject)' == 'false' and '$(IsXampleProject)' == 'false' ">
1010
<IsPackable>true</IsPackable>
1111
<IsTestProject>false</IsTestProject>
1212
</PropertyGroup>
1313

14+
<PropertyGroup Condition=" '$(IsXampleProject)' == 'true' ">
15+
<IsPackable>false</IsPackable>
16+
<IsTestProject>false</IsTestProject>
17+
</PropertyGroup>
18+
1419
</Project>

src/NetEvolve.Defaults/build/SupportPackageInformation.targets

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project TreatAsLocalProperty="_SolutionLicense;_ProjectReadme;_SolutionReadme">
22

3-
<PropertyGroup Label="Package Information" Condition=" '$(IsTestableProject)' != 'true' ">
3+
<PropertyGroup Label="Package Information" Condition=" '$(IsTestableProject)' != 'true' and '$(IsXampleProject)' != 'true' ">
44
<PackageId Condition=" '$(PackageId)' == '' ">$(MSBuildProjectName)</PackageId>
55
<Title Condition=" '$(Title)' == '' ">$(MSBuildProjectName)</Title>
66

@@ -20,11 +20,11 @@
2020
<GeneratePackageOnBuild Condition=" '$(GeneratePackageOnBuild)' == '' ">true</GeneratePackageOnBuild>
2121
</PropertyGroup>
2222

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

27-
<ItemGroup Label="Package Files" Condition=" '$(IsTestableProject)' != 'true' ">
27+
<ItemGroup Label="Package Files" Condition=" '$(IsTestableProject)' != 'true' and '$(IsXampleProject)' != 'true' ">
2828
<_SolutionLicense Include="LICENSE" Condition="Exists('LICENSE')" />
2929
<_SolutionLicense Include="$(SolutionDir)LICENSE" Condition="@(_SolutionLicense) == '' and Exists('$(SolutionDir)LICENSE')" />
3030
<None Include="@(_SolutionLicense)" Pack="true" PackagePath="" Visible="false" Condition="Exists(@(_SolutionLicense))" />

0 commit comments

Comments
 (0)