forked from getsentry/sentry-dotnet
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDirectory.Build.props
More file actions
85 lines (72 loc) · 4.2 KB
/
Directory.Build.props
File metadata and controls
85 lines (72 loc) · 4.2 KB
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
<Project>
<PropertyGroup>
<Version>3.29.1</Version>
<LangVersion>10</LangVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory).assets\Sentry.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<Deterministic>true</Deterministic>
<Features>strict</Features>
<ImplicitUsings>true</ImplicitUsings>
<!-- Allow references to unsigned assemblies (like MAUI) from signed projects -->
<NoWarn>$(NoWarn);CS8002</NoWarn>
</PropertyGroup>
<!--
Configure Sentry CLI
NOTE: Authentication is not set here. Instead:
- In CI, `SENTRY_AUTH_TOKEN` is set as an environment variable via a GitHub Actions secret.
- In dev, you can either set `SENTRY_AUTH_TOKEN` manually, or you can set an auth token
in your ~/.sentryclirc file. See https://docs.sentry.io/product/cli/configuration/
There is also a a `SentryAuthToken` msbuild property, but it should be used sparingly.
If using it, be careful that the auth token does not get committed to source control.
-->
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<SentryOrg>sentry-sdks</SentryOrg>
<SentryProject>sentry-dotnet</SentryProject>
<SentryUploadSymbols>true</SentryUploadSymbols>
<SentryUploadSources>true</SentryUploadSources>
</PropertyGroup>
<!--
Note: The following platform-specific properties need to be set in both Directory.Build.props and DirectoryBuild.targets.
TODO: Figure out how to consolidate to a single location.
-->
<PropertyGroup>
<TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
<SupportedOSPlatformVersion Condition="'$(TargetPlatformIdentifier)' == 'ios'">10.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="'$(TargetPlatformIdentifier)' == 'maccatalyst'">13.1</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="'$(TargetPlatformIdentifier)' == 'android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="'$(TargetPlatformIdentifier)' == 'tizen'">6.5</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="'$(TargetPlatformIdentifier)' == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="'$(TargetPlatformIdentifier)' == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
</PropertyGroup>
<!-- This is helpful in code to distinguish neutral targets. -->
<PropertyGroup>
<DefineConstants Condition="'$(TargetPlatformIdentifier)' == ''">$(DefineConstants);PLATFORM_NEUTRAL</DefineConstants>
</PropertyGroup>
<!-- We're aware it's out of support but this is a library and it doesn't require nca3.1. -->
<!-- there's no reason to cause friction to a consumer that for some reason is stuck on an unsupported version. -->
<PropertyGroup>
<CheckEolTargetFramework>false</CheckEolTargetFramework>
</PropertyGroup>
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
<DefineConstants>$(DefineConstants);CI_BUILD</DefineConstants>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="UnoptimizedAssemblyDetector" Version="0.1.*" PrivateAssets="All" />
<PackageReference Include="Roslynator.Analyzers" Version="4.*" PrivateAssets="All" />
<PackageReference Include="Nullable" Version="1.*" PrivateAssets="All" />
</ItemGroup>
<!-- Import the root global usings, except for samples. -->
<ItemGroup Condition="!$(MSBuildProjectName.Contains('Samples'))">
<Compile Include="$(MSBuildThisFileDirectory)GlobalUsings.cs" />
<!-- Add these here instead, so we can remove them for projects that don't have STJ available. -->
<Using Include="System.Text.Json" />
<Using Include="System.Text.Json.Serialization" />
</ItemGroup>
<!-- Set the version and local path for Sentry CLI (downloaded in the restore phase of Sentry.csproj) -->
<PropertyGroup Condition="'$(SolutionName)' != 'Sentry.Unity'">
<SentryCLIVersion>2.15.2</SentryCLIVersion>
<SentryCLIDirectory>$(MSBuildThisFileDirectory)tools\sentry-cli\$(SentryCLIVersion)\</SentryCLIDirectory>
</PropertyGroup>
</Project>