195 lines
14 KiB
XML
195 lines
14 KiB
XML
<Project>
|
|
<!-- ============================================================================
|
|
CONSOLIDATED Directory.Build.props
|
|
All build properties for the StellaOps repository.
|
|
Service versions managed separately in Directory.Versions.props.
|
|
============================================================================ -->
|
|
|
|
<!-- Import centralized service versioning -->
|
|
<Import Project="$(MSBuildThisFileDirectory)Directory.Versions.props" Condition="Exists('$(MSBuildThisFileDirectory)Directory.Versions.props')" />
|
|
|
|
<!-- ============================================================================
|
|
REPO-LEVEL SETTINGS (from root Directory.Build.props)
|
|
============================================================================ -->
|
|
<PropertyGroup>
|
|
<StellaOpsRepoRoot Condition="'$(StellaOpsRepoRoot)' == ''">$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)../'))</StellaOpsRepoRoot>
|
|
<StellaOpsDotNetPublicSource Condition="'$(StellaOpsDotNetPublicSource)' == ''">https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json</StellaOpsDotNetPublicSource>
|
|
<RestoreConfigFile Condition="'$(RestoreConfigFile)' == ''">$([System.IO.Path]::Combine('$(StellaOpsRepoRoot)','nuget.config'))</RestoreConfigFile>
|
|
</PropertyGroup>
|
|
|
|
<!-- Package metadata for NuGet publishing -->
|
|
<PropertyGroup>
|
|
<Authors>StellaOps</Authors>
|
|
<Company>StellaOps</Company>
|
|
<Product>StellaOps</Product>
|
|
<Copyright>Copyright (c) StellaOps. All rights reserved.</Copyright>
|
|
<PackageLicenseExpression>AGPL-3.0-or-later</PackageLicenseExpression>
|
|
<PackageProjectUrl>https://git.stella-ops.org/stella-ops.org/git.stella-ops.org</PackageProjectUrl>
|
|
<RepositoryUrl>https://git.stella-ops.org/stella-ops.org/git.stella-ops.org</RepositoryUrl>
|
|
<RepositoryType>git</RepositoryType>
|
|
<PublishRepositoryUrl>true</PublishRepositoryUrl>
|
|
<PackageReadmeFile Condition="Exists('README.md')">README.md</PackageReadmeFile>
|
|
<PackageTags>stellaops;security;sbom;vex;attestation;supply-chain</PackageTags>
|
|
</PropertyGroup>
|
|
|
|
<!-- CryptoPro support -->
|
|
<PropertyGroup>
|
|
<StellaOpsEnableCryptoPro Condition="'$(StellaOpsEnableCryptoPro)' == ''">false</StellaOpsEnableCryptoPro>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Condition="'$(StellaOpsEnableCryptoPro)' == 'true'">
|
|
<DefineConstants>$(DefineConstants);STELLAOPS_CRYPTO_PRO</DefineConstants>
|
|
</PropertyGroup>
|
|
|
|
<!-- ============================================================================
|
|
NUGET AND RESTORE SETTINGS
|
|
============================================================================ -->
|
|
<PropertyGroup>
|
|
<!-- Centralize NuGet package cache to prevent directory sprawl -->
|
|
<RestorePackagesPath>$(MSBuildThisFileDirectory)../.nuget/packages</RestorePackagesPath>
|
|
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
|
|
|
|
<!-- Disable NuGet audit to prevent build failures when mirrors are unreachable -->
|
|
<NuGetAudit>false</NuGetAudit>
|
|
|
|
<!-- Suppress NuGet warnings -->
|
|
<NoWarn>$(NoWarn);NU1608;NU1605;NU1202;NU1107;NU1504;NU1101;CS1591</NoWarn>
|
|
<WarningsNotAsErrors>$(WarningsNotAsErrors);NU1608;NU1605;NU1202;NU1107;NU1504;NU1101;NU1900;NU1901;NU1902;NU1903;NU1904</WarningsNotAsErrors>
|
|
<RestoreNoWarn>$(RestoreNoWarn);NU1608;NU1605;NU1202;NU1107;NU1504;NU1101</RestoreNoWarn>
|
|
<RestoreWarningsAsErrors></RestoreWarningsAsErrors>
|
|
<RestoreTreatWarningsAsErrors>false</RestoreTreatWarningsAsErrors>
|
|
<RestoreDisableImplicitNuGetFallbackFolder>true</RestoreDisableImplicitNuGetFallbackFolder>
|
|
<RestoreFallbackFolders>clear</RestoreFallbackFolders>
|
|
<RestoreFallbackFoldersExcludes>clear</RestoreFallbackFoldersExcludes>
|
|
<RestoreAdditionalProjectFallbackFolders>clear</RestoreAdditionalProjectFallbackFolders>
|
|
<RestoreAdditionalProjectFallbackFoldersExcludes>clear</RestoreAdditionalProjectFallbackFoldersExcludes>
|
|
<RestoreAdditionalFallbackFolders>clear</RestoreAdditionalFallbackFolders>
|
|
<RestoreAdditionalFallbackFoldersExcludes>clear</RestoreAdditionalFallbackFoldersExcludes>
|
|
</PropertyGroup>
|
|
|
|
<!-- Asset target fallback for backward compatibility -->
|
|
<PropertyGroup>
|
|
<AssetTargetFallback>$(AssetTargetFallback);net8.0;net7.0;net6.0;netstandard2.1;netstandard2.0</AssetTargetFallback>
|
|
</PropertyGroup>
|
|
|
|
<!-- ============================================================================
|
|
PLUGIN OUTPUT PATHS AND DETECTION
|
|
============================================================================ -->
|
|
<PropertyGroup>
|
|
<!-- Concelier plugins -->
|
|
<ConcelierPluginOutputRoot Condition="'$(ConcelierPluginOutputRoot)' == ''">$(SolutionDir)plugins\concelier</ConcelierPluginOutputRoot>
|
|
<ConcelierPluginOutputRoot Condition="'$(ConcelierPluginOutputRoot)' == '' and '$(SolutionDir)' == ''">$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\plugins\concelier\'))</ConcelierPluginOutputRoot>
|
|
<IsConcelierPlugin Condition="'$(IsConcelierPlugin)' == '' and $([System.String]::Copy('$(MSBuildProjectName)').StartsWith('StellaOps.Concelier.Connector.'))">true</IsConcelierPlugin>
|
|
<IsConcelierPlugin Condition="'$(IsConcelierPlugin)' == '' and $([System.String]::Copy('$(MSBuildProjectName)').StartsWith('StellaOps.Concelier.Exporter.'))">true</IsConcelierPlugin>
|
|
|
|
<!-- Authority plugins -->
|
|
<AuthorityPluginOutputRoot Condition="'$(AuthorityPluginOutputRoot)' == ''">$(SolutionDir)plugins\authority</AuthorityPluginOutputRoot>
|
|
<AuthorityPluginOutputRoot Condition="'$(AuthorityPluginOutputRoot)' == '' and '$(SolutionDir)' == ''">$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\plugins\authority\'))</AuthorityPluginOutputRoot>
|
|
<IsAuthorityPlugin Condition="'$(IsAuthorityPlugin)' == '' and $([System.String]::Copy('$(MSBuildProjectName)').StartsWith('StellaOps.Authority.Plugin.'))">true</IsAuthorityPlugin>
|
|
|
|
<!-- Notify plugins -->
|
|
<NotifyPluginOutputRoot Condition="'$(NotifyPluginOutputRoot)' == '' and '$(SolutionDir)' != ''">$(SolutionDir)plugins\notify</NotifyPluginOutputRoot>
|
|
<NotifyPluginOutputRoot Condition="'$(NotifyPluginOutputRoot)' == '' and '$(SolutionDir)' == ''">$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\plugins\notify\'))</NotifyPluginOutputRoot>
|
|
<IsNotifyPlugin Condition="'$(IsNotifyPlugin)' == '' and $([System.String]::Copy('$(MSBuildProjectName)').StartsWith('StellaOps.Notify.Connectors.')) and !$([System.String]::Copy('$(MSBuildProjectName)').EndsWith('.Tests'))">true</IsNotifyPlugin>
|
|
<IsNotifyPlugin Condition="'$(IsNotifyPlugin)' == 'true' and $([System.String]::Copy('$(MSBuildProjectName)')) == 'StellaOps.Notify.Connectors.Shared'">false</IsNotifyPlugin>
|
|
|
|
<!-- Scanner plugins -->
|
|
<ScannerBuildxPluginOutputRoot Condition="'$(ScannerBuildxPluginOutputRoot)' == ''">$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\plugins\scanner\buildx\'))</ScannerBuildxPluginOutputRoot>
|
|
<IsScannerBuildxPlugin Condition="'$(IsScannerBuildxPlugin)' == '' and $([System.String]::Copy('$(MSBuildProjectName)')) == 'StellaOps.Scanner.Sbomer.BuildXPlugin'">true</IsScannerBuildxPlugin>
|
|
<ScannerOsAnalyzerPluginOutputRoot Condition="'$(ScannerOsAnalyzerPluginOutputRoot)' == ''">$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\plugins\scanner\analyzers\os\'))</ScannerOsAnalyzerPluginOutputRoot>
|
|
<IsScannerOsAnalyzerPlugin Condition="'$(IsScannerOsAnalyzerPlugin)' == '' and $([System.String]::Copy('$(MSBuildProjectName)').StartsWith('StellaOps.Scanner.Analyzers.OS.')) and !$([System.String]::Copy('$(MSBuildProjectName)').EndsWith('.Tests'))">true</IsScannerOsAnalyzerPlugin>
|
|
<ScannerLangAnalyzerPluginOutputRoot Condition="'$(ScannerLangAnalyzerPluginOutputRoot)' == ''">$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\plugins\scanner\analyzers\lang\'))</ScannerLangAnalyzerPluginOutputRoot>
|
|
<IsScannerLangAnalyzerPlugin Condition="'$(IsScannerLangAnalyzerPlugin)' == '' and $([System.String]::Copy('$(MSBuildProjectName)').StartsWith('StellaOps.Scanner.Analyzers.Lang.'))">true</IsScannerLangAnalyzerPlugin>
|
|
</PropertyGroup>
|
|
|
|
<!-- ============================================================================
|
|
TEST INFRASTRUCTURE PATHS
|
|
============================================================================ -->
|
|
<PropertyGroup>
|
|
<ConcelierTestingPath Condition="'$(ConcelierTestingPath)' == '' and Exists('$(MSBuildThisFileDirectory)__Tests\__Libraries\StellaOps.Concelier.Testing\StellaOps.Concelier.Testing.csproj')">$(MSBuildThisFileDirectory)__Tests\__Libraries\StellaOps.Concelier.Testing\</ConcelierTestingPath>
|
|
<ConcelierSharedTestsPath Condition="'$(ConcelierSharedTestsPath)' == '' and Exists('$(MSBuildThisFileDirectory)Concelier\StellaOps.Concelier.Tests.Shared\AssemblyInfo.cs')">$(MSBuildThisFileDirectory)Concelier\StellaOps.Concelier.Tests.Shared\</ConcelierSharedTestsPath>
|
|
</PropertyGroup>
|
|
|
|
<!-- ============================================================================
|
|
MODULE-SPECIFIC SUPPRESSIONS
|
|
============================================================================ -->
|
|
|
|
<!-- Concelier module: suppress noisy warnings during test harness runs -->
|
|
<PropertyGroup Condition="$(MSBuildProjectDirectory.Replace('\','/').Contains('/Concelier/'))">
|
|
<NoWarn>$(NoWarn);CS0105;CS8601;CS8602;CS8604;CS0618;RS1032;RS2007;xUnit1041;xUnit1031;xUnit2013;NU1510;NETSDK1023;SYSLIB0057</NoWarn>
|
|
</PropertyGroup>
|
|
|
|
<!-- ============================================================================
|
|
PROJECT REFERENCES
|
|
============================================================================ -->
|
|
<ItemGroup>
|
|
<ProjectReference Update="../StellaOps.Plugin/StellaOps.Plugin.csproj">
|
|
<Private>false</Private>
|
|
<ExcludeAssets>runtime</ExcludeAssets>
|
|
</ProjectReference>
|
|
</ItemGroup>
|
|
|
|
<!-- ============================================================================
|
|
TEST PROJECT CONFIGURATION
|
|
============================================================================ -->
|
|
|
|
<PropertyGroup Condition="$([System.String]::Copy('$(MSBuildProjectName)').EndsWith('.Tests')) and '$(UseXunitV3)' == ''">
|
|
<UseXunitV3>true</UseXunitV3>
|
|
</PropertyGroup>
|
|
|
|
<!-- xUnit analyzer suppressions for ALL test projects -->
|
|
<!-- Matches: *.Tests, *UnitTests, __Tests/*, Integration.* test projects -->
|
|
<PropertyGroup Condition="$([System.String]::Copy('$(MSBuildProjectName)').EndsWith('Tests')) or
|
|
$([System.String]::Copy('$(MSBuildProjectDirectory)').Contains('__Tests')) or
|
|
$([System.String]::Copy('$(MSBuildProjectName)').StartsWith('StellaOps.Integration.'))">
|
|
<!-- xUnit analyzer warnings - test-specific advisories, not code quality issues -->
|
|
<!-- xUnit1012: Null should only be used for reference types -->
|
|
<!-- xUnit1013: Public method should be marked as test -->
|
|
<!-- xUnit1026: Unused theory parameters -->
|
|
<!-- xUnit1030: Do not call ConfigureAwait in test method -->
|
|
<!-- xUnit1031: Blocking task operations -->
|
|
<!-- xUnit1051: CancellationToken advisory -->
|
|
<!-- xUnit2000: Constants and literals should be first argument to Assert.Equal -->
|
|
<!-- xUnit2002: Assert.NotNull on value types -->
|
|
<!-- xUnit2009: Assert.True for substrings -->
|
|
<!-- xUnit2012: Assert pattern preferences -->
|
|
<!-- xUnit2013: Assert pattern preferences -->
|
|
<!-- xUnit2031: Where before Assert.Single -->
|
|
<!-- xUnit3003: Theories with inline data should have unique data -->
|
|
<!-- CS8424: Nullable reference patterns in tests -->
|
|
<!-- CS8601: Possible null reference assignment (intentional in tests) -->
|
|
<!-- CS8602: Dereference of possibly null reference (test context) -->
|
|
<!-- CS8604: Possible null reference argument (test context) -->
|
|
<!-- CS8619: Nullability mismatch in return type (test context) -->
|
|
<!-- CS8633: Nullability in constraints (test implementations) -->
|
|
<!-- CS8714: Type cannot be used as type parameter (test context) -->
|
|
<!-- CS8767: Nullability mismatch in interface implementation (test context) -->
|
|
<!-- CA1416: Platform compatibility (Windows-specific tests) -->
|
|
<!-- EXCITITOR001: Custom analyzer for deprecated consensus logic (AOC-19) -->
|
|
<NoWarn>$(NoWarn);xUnit1012;xUnit1013;xUnit1026;xUnit1030;xUnit1031;xUnit1051;xUnit2000;xUnit2002;xUnit2009;xUnit2012;xUnit2013;xUnit2031;xUnit3003;CS8424;CS8601;CS8602;CS8604;CS8619;CS8633;CS8714;CS8767;CA1416;EXCITITOR001</NoWarn>
|
|
</PropertyGroup>
|
|
|
|
<!-- Concelier shared test infrastructure (only when paths exist and not opted out) -->
|
|
<ItemGroup Condition="$([System.String]::Copy('$(MSBuildProjectName)').EndsWith('.Tests')) and '$(UseConcelierTestInfra)' != 'false'">
|
|
<Compile Include="$(ConcelierSharedTestsPath)AssemblyInfo.cs" Link="Shared\AssemblyInfo.cs" Condition="'$(ConcelierSharedTestsPath)' != ''" />
|
|
<Compile Include="$(ConcelierSharedTestsPath)ConcelierFixtureCollection.cs" Link="Shared\ConcelierFixtureCollection.cs" Condition="'$(ConcelierSharedTestsPath)' != ''" />
|
|
<ProjectReference Include="$(ConcelierTestingPath)StellaOps.Concelier.Testing.csproj" Condition="'$(ConcelierTestingPath)' != ''" />
|
|
<Using Include="StellaOps.Concelier.Testing" Condition="'$(ConcelierTestingPath)' != ''" />
|
|
</ItemGroup>
|
|
|
|
<!-- Test projects using xUnit v3 -->
|
|
<PropertyGroup Condition="$([System.String]::Copy('$(MSBuildProjectName)').EndsWith('.Tests')) and '$(UseXunitV3)' == 'true'">
|
|
<OutputType Condition="'$(OutputType)' == ''">Exe</OutputType>
|
|
<UseAppHost>true</UseAppHost>
|
|
</PropertyGroup>
|
|
<ItemGroup Condition="$([System.String]::Copy('$(MSBuildProjectName)').EndsWith('.Tests')) and '$(UseXunitV3)' == 'true'">
|
|
<PackageReference Include="Microsoft.NET.Test.Sdk" />
|
|
<PackageReference Include="xunit.v3" />
|
|
<PackageReference Include="xunit.runner.visualstudio">
|
|
<PrivateAssets>all</PrivateAssets>
|
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
|
</PackageReference>
|
|
<Using Include="Xunit" />
|
|
</ItemGroup>
|
|
</Project>
|