-
Notifications
You must be signed in to change notification settings - Fork 44
/
Directory.Build.props
94 lines (79 loc) · 3.85 KB
/
Directory.Build.props
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<Project>
<!-- Detect project kind -->
<PropertyGroup>
<IsTestProject>$(MSBuildProjectName.Contains('.UnitTests'))</IsTestProject>
<IsTestMode>$(MSBuildProjectName.Contains('TestMode.'))</IsTestMode>
<IsLibrary Condition="'$(IsTestMode)' != 'True' and '$(IsTestProject)' != 'True' and $(MSBuildProjectName.Contains('Benchmark')) != 'True' and '$(MSBuildProjectExtension)' == '.csproj'">True</IsLibrary>
</PropertyGroup>
<!-- Build configuration -->
<PropertyGroup>
<IsPackable>false</IsPackable>
</PropertyGroup>
<PropertyGroup Condition="'$(IsLibrary)' == 'True'">
<OutputPath>..\..\bin\$(MSBuildProjectName)\$(Configuration)\</OutputPath>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<IsPackable>true</IsPackable>
</PropertyGroup>
<PropertyGroup Condition="'$(IsTestMode)' == 'True'">
<OutputPath>..\..\env\gamemode\$(MSBuildProjectName)</OutputPath>
</PropertyGroup>
<!-- Configuration for packages -->
<PropertyGroup Label="Configure default AssemblyInfo">
<Company>Tim Potze</Company>
<Authors>Tim Potze</Authors>
<Copyright>Copyright (c) Tim Potze 2014-$([System.DateTime]::UtcNow.ToString(yyyy))</Copyright>
<NeutralLanguage>en-US</NeutralLanguage>
</PropertyGroup>
<PropertyGroup Label="Configure default package info" Condition="'$(IsLibrary)' == 'True'">
<PackageProjectUrl>https://github.com/ikkentim/SampSharp</PackageProjectUrl>
<PackageIcon>sampsharp.png</PackageIcon>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageTags>gta samp sampsharp</PackageTags>
<PackageId>$(AssemblyName)</PackageId>
<Product>$(AssemblyName)</Product>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
</PropertyGroup>
<ItemGroup Condition="'$(IsLibrary)' == 'True'">
<None Include="$(MSBuildThisFileDirectory)\art\sampsharp.png" Pack="true" PackagePath="\" />
</ItemGroup>
<PropertyGroup Label="Versioning">
<VersionPrefix>0.0.0</VersionPrefix>
<VersionSuffix>local</VersionSuffix>
</PropertyGroup>
<PropertyGroup Condition="'$(CiVersion)' != ''" Label="Versioning CI">
<VersionPrefix>$(CiVersion.Split('-', 2)[0])</VersionPrefix>
<VersionSuffix></VersionSuffix>
<VersionSuffix Condition="$(CiVersion.Contains('-'))">$(CiVersion.Split('-', 2)[1])</VersionSuffix>
</PropertyGroup>
<!-- Code analysis -->
<PropertyGroup Label="Configure code analysis">
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<CodeAnalysisTreatWarningsAsErrors>false</CodeAnalysisTreatWarningsAsErrors>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
<RunAnalyzersDuringBuild>true</RunAnalyzersDuringBuild>
<RunAnalyzersDuringLiveAnalysis>true</RunAnalyzersDuringLiveAnalysis>
<AnalysisLevel>latest</AnalysisLevel>
</PropertyGroup>
<ItemGroup Condition="'$(IsTestProject)' != 'True' and '$(MSBuildProjectExtension)' == '.csproj'">
<PackageReference Include="SonarAnalyzer.CSharp" Version="8.37.0.45539">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<!-- Symbols / source linking -->
<PropertyGroup Label="Symbols" Condition="'$(IsLibrary)' == 'True'">
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>
<PropertyGroup Label="SourceLink">
<EmbedUntrackedSources>true</EmbedUntrackedSources>
</PropertyGroup>
<ItemGroup Condition="'$(IsLibrary)' == 'True'">
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
</ItemGroup>
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>
</Project>