-
Notifications
You must be signed in to change notification settings - Fork 2
/
sonar-api.csproj
119 lines (106 loc) · 5.51 KB
/
sonar-api.csproj
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<Project Sdk="Microsoft.NET.Sdk.Web">
<Import Project="../shared.props" />
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<RootNamespace>Cms.BatCave.Sonar</RootNamespace>
<AssemblyName>cms.batcave.sonar.api</AssemblyName>
<OutputType>Exe</OutputType>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<Version Condition=" '$(VersionSuffix)' != '' ">$(VersionPrefix)-$(VersionSuffix)</Version>
<Version Condition=" '$(Version)' == '' ">$(VersionPrefix)</Version>
<PackageLicenseExpression>CC0-1.0</PackageLicenseExpression>
</PropertyGroup>
<ItemGroup>
<InternalsVisibleTo Include="sonar-api-tests" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\sonar-core\sonar-core.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Asp.Versioning.Mvc" Version="8.0.0" />
<PackageReference Include="BCrypt.Net-Next" Version="4.0.3" />
<PackageReference Include="CommandLineParser" Version="2.9.1" />
<PackageReference Include="EFCore.NamingConventions" Version="8.0.0" />
<PackageReference Include="Google.Protobuf" Version="3.21.9" />
<PackageReference Include="KubernetesClient" Version="10.0.27" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
<!-- Snappy depends on NETStandard 1.6 which has vulnerabilities, this forces an upgrade.
Note: 2.x is largely backward comaptible. -->
<PackageReference Include="NETStandard.Library" Version="2.0.3" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.0" />
<PackageReference Include="Okta.AspNetCore" Version="4.4.2" />
<PackageReference Include="OpenTelemetry" Version="1.6.0" />
<PackageReference Include="OpenTelemetry.Exporter.Console" Version="1.6.0" />
<PackageReference Include="OpenTelemetry.Exporter.Prometheus.AspNetCore" Version="1.6.0-rc.1" />
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.6.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.8.1" />
<PackageReference Include="OpenTelemetry.Instrumentation.EntityFrameworkCore" Version="1.0.0-beta.8" />
<PackageReference Include="prom-query-dotnet" Version="0.0.5" />
<PackageReference Include="Snappy.Standard" Version="0.2.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Google.Protobuf.Tools" Version="3.21.9" GeneratePathProperty="true" />
</ItemGroup>
<Choose>
<When Condition="'$(OS)' == 'Windows_NT' And $([System.Environment]::Is64BitOperatingSystem)">
<PropertyGroup>
<ProtocToolPath>windows_x64/protoc.exe</ProtocToolPath>
</PropertyGroup>
</When>
<When Condition="'$(OS)' == 'Windows_NT' And !($([System.Environment]::Is64BitOperatingSystem))">
<PropertyGroup>
<ProtocToolPath>windows_x86/protoc.exe</ProtocToolPath>
</PropertyGroup>
</When>
<When Condition="$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux))) And $([System.Environment]::Is64BitOperatingSystem)">
<PropertyGroup>
<ProtocToolPath>linux_x64/protoc</ProtocToolPath>
</PropertyGroup>
</When>
<When Condition="$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux))) And !($([System.Environment]::Is64BitOperatingSystem))">
<PropertyGroup>
<ProtocToolPath>linux_x86/protoc</ProtocToolPath>
</PropertyGroup>
</When>
<When Condition="$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))">
<PropertyGroup>
<ProtocToolPath>macosx_x64/protoc</ProtocToolPath>
</PropertyGroup>
</When>
</Choose>
<PropertyGroup>
<ProtocArguments_Prometheus_Remote>
--csharp_out=./Protobuf/Prometheus
--csharp_opt=file_extension=.g.cs
--proto_path=../lib/prometheus/prompb
--proto_path=../lib/gogo-protobuf
--proto_path=../lib/gogo-protobuf/protobuf
../lib/prometheus/prompb/remote.proto ../lib/prometheus/prompb/types.proto
</ProtocArguments_Prometheus_Remote>
<ProtocArguments_Prometheus_Gogoproto>
--csharp_out=./Protobuf/Gogoproto
--csharp_opt=file_extension=.g.cs
--proto_path=../lib/gogo-protobuf
--proto_path=../lib/gogo-protobuf/protobuf
../lib/gogo-protobuf/gogoproto/gogo.proto
</ProtocArguments_Prometheus_Gogoproto>
</PropertyGroup>
<Target Name="generate_prometheus_types">
<Message Text="Generating C# Data Types for Prometheus Remote Write..." Importance="high" />
<Exec Command="$(PkgGoogle_Protobuf_Tools)/tools/$(ProtocToolPath) $(ProtocArguments_Prometheus_Gogoproto.Replace('%0a', '').Trim())" />
<Exec Command="$(PkgGoogle_Protobuf_Tools)/tools/$(ProtocToolPath) $(ProtocArguments_Prometheus_Remote.Replace('%0a', '').Trim())" />
</Target>
<ItemGroup>
<PackageReference Include="NSwag.MSBuild" Version="13.18.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<Target Name="NSwag">
<Exec Command="$(NSwagExe_Net70) run nswag.json" />
</Target>
</Project>