Files
spark/src/Directory.Build.props
T
John Colvin 50a1dfae14 refactor: Model config profiles after dotnet appsettings
Namely, in DataStreamPublisher and PubSubServer. This is part of a
broader paradigm shift towards dotnet factory pattern.

https://learn.microsoft.com/en-us/dotnet/core/extensions/dependency-injection-guidelines

* Rename Configurations/<name>.json -> appsettings.<name>.json
* Move reusable startup code into new Bts.Extensions.Hosting proj
2025-11-19 13:21:50 -05:00

101 lines
3.8 KiB
XML

<Project>
<PropertyGroup>
<ComputerSpecificConfig>..\tools\override\$(computername).props</ComputerSpecificConfig>
<SparkRoot>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)\..))</SparkRoot>
<SourceRoot>$([System.IO.Path]::GetFullPath($(SparkRoot)\src))</SourceRoot>
<DepotName>$([System.IO.Path]::GetFileName($([System.IO.Path]::GetFullPath($(SparkRoot)))))</DepotName>
<ErrorReport>None</ErrorReport>
<Prefer32Bit>False</Prefer32Bit>
<Deterministic>true</Deterministic>
<EnableDefaultContentItems>False</EnableDefaultContentItems>
<ShowMissingItemTypes>false</ShowMissingItemTypes>
<Configuration Condition="'$(configuration)'==''">Debug</Configuration>
<EnablePreviewFeatures>true</EnablePreviewFeatures>
<LangVersion>11</LangVersion>
</PropertyGroup>
<Choose>
<When Condition="'$(OS)' == 'Windows_NT'">
<PropertyGroup>
<Externals>$(SparkRoot)\externals\windows</Externals>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<Externals>$(SparkRoot)\externals\linux</Externals>
</PropertyGroup>
</Otherwise>
</Choose>
<PropertyGroup Label="Output">
<BaseOutputPath>$(SparkRoot)\build\$(Configuration)</BaseOutputPath>
<OutputPath>$(BaseOutputPath)\bin</OutputPath>
<BaseIntermediateOutputPath>$(BaseOutputPath)\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
<IntermediateOutputPath>$(BaseOutputPath)\obj\$(MSBuildProjectName)</IntermediateOutputPath>
<ProtoOutputPath>$(BaseOutputPath)\obj\$(MSBuildProjectName)</ProtoOutputPath>
<ScannerOutputPath>$(BaseOutputPath)\obj\$(MSBuildProjectName)</ScannerOutputPath>
<ParserOutputPath>$(BaseOutputPath)\obj\$(MSBuildProjectName)</ParserOutputPath>
</PropertyGroup>
<Import
Project="$(ComputerSpecificConfig)"
Condition="Exists($(ComputerSpecificConfig))" />
<PropertyGroup Label="ProtoBuf">
<ProtocPluginBase>$(SparkRoot)\src\lib_spark\spark\api\service_compiler</ProtocPluginBase>
</PropertyGroup>
<Choose>
<When Condition="'$(OS)' == 'Windows_NT'">
<PropertyGroup Label="ProtoBuf">
<protoc>$(Externals)\bin\protoc.exe</protoc>
<ProtocPlugin>$(ProtocPluginBase)\plugin.cmd</ProtocPlugin>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup Label="ProtoBuf">
<protoc>$(Externals)\bin\protoc</protoc>
<ProtocPlugin>$(ProtocPluginBase)\plugin.sh</ProtocPlugin>
</PropertyGroup>
</Otherwise>
</Choose>
<ItemDefinitionGroup>
<!--
Google automatically converts .proto filenames to TitleCase when
generating .cs files. Unless the .proto file is already in TitleCase
(against Google's recommended practice to use snake_case .proto files),
the 'CSName' must be overridden with the TitleCase formatting.
For example:
<ProtoService Include="foo_bar.proto" CSName="FooBar" />
-->
<Proto>
<OutDir>$(ProtoOutputPath)\</OutDir>
<CSName>%(FileName)</CSName>
</Proto>
<!--
Each .proto (service) input file produces 4 output files. For example,
'foo_bar.proto' produces:
* FooBar.cs
* foo_bar.client.pb.cs
* foo_bar.server.pb.cs
* foo_bar.immutable.pb.cs
-->
<ProtoService>
<OutDir>$(ProtoOutputPath)\</OutDir>
<CSName>%(FileName)</CSName>
</ProtoService>
</ItemDefinitionGroup>
<ItemDefinitionGroup>
<ConfigurationProfile>
<OutDir>$(OutputPath)\Configurations\$(MSBuildProjectName)</OutDir>
<OutFile>$(OutputPath)\$(MSBuildProjectName).%(FileName)%(Extension)</OutFile>
<PublishOutDir>$(OutputPath)\publish\Configurations\$(MSBuildProjectName)</PublishOutDir>
<PublishOutFile>$(OutputPath)\publish\$(MSBuildProjectName).%(FileName)%(Extension)</PublishOutFile>
</ConfigurationProfile>
</ItemDefinitionGroup>
</Project>