<Project>

  <PropertyGroup>
    <TargetFramework>net10.0</TargetFramework>
    <LangVersion>latest</LangVersion>
    <Nullable>enable</Nullable>
    <ImplicitUsings>enable</ImplicitUsings>
  </PropertyGroup>

  <PropertyGroup Label="Quality gates">
    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
    <EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
    <!--
      Recommended, not All. With TreatWarningsAsErrors on, latest-All turns opinionated
      naming rules (CA1711 reserved suffixes, CA1724 namespace collisions) into build
      breaks, which trains people to reach for blanket suppressions and devalues the
      analyzers that catch real defects. Correctness and security rules we specifically
      want beyond Recommended are raised individually in .editorconfig.
    -->
    <AnalysisLevel>latest-Recommended</AnalysisLevel>
    <AnalysisMode>Recommended</AnalysisMode>
    <!-- The whole product is UTC-only and container-hosted; no tzdata, no culture-sensitive
         formatting. Set here rather than per-project so it cannot drift. -->
    <InvariantGlobalization>true</InvariantGlobalization>
  </PropertyGroup>

  <PropertyGroup Label="Reproducible builds">
    <Deterministic>true</Deterministic>
    <ContinuousIntegrationBuild Condition="'$(CI)' == 'true'">true</ContinuousIntegrationBuild>
    <ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
    <CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
    <!-- packages.lock.json is committed; CI restores in locked mode. -->
    <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
  </PropertyGroup>

  <PropertyGroup Label="Version">
    <!--
      The version comes from the nearest v* tag; see the MinVer entry in Directory.Packages.props for
      why it is derived rather than written down. The prefix matches the tags ci.yml already triggers
      on, so `git tag v0.1.0` is the whole act of choosing a version.
    -->
    <MinVerTagPrefix>v</MinVerTagPrefix>
  </PropertyGroup>

  <PropertyGroup Label="Assembly metadata">
    <Company>DodoTech</Company>
    <Product>DodoSSH</Product>
    <NeutralLanguage>en</NeutralLanguage>
    <Copyright>Copyright (c) 2026 Jaap-Jan de Wit (DodoTech)</Copyright>
    <!--
      Set solution-wide rather than only on the packable project. DodoSSH.Contracts is
      published to GitHub Packages so clients can build against it, and a package without a
      licence expression is one a corporate consumer's policy scanner rejects outright.
    -->
    <PackageLicenseExpression>MIT</PackageLicenseExpression>
  </PropertyGroup>

  <ItemGroup Label="Analyzers">
    <PackageReference Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" PrivateAssets="all" />
    <PackageReference Include="Meziantou.Analyzer" PrivateAssets="all" />
  </ItemGroup>

  <ItemGroup Label="Versioning">
    <!--
      PrivateAssets="all" because this is a build-time task and not something a consumer of
      DodoSSH.Contracts should inherit.
    -->
    <PackageReference Include="MinVer" PrivateAssets="all" />
  </ItemGroup>

  <ItemGroup Label="Banned API list">
    <AdditionalFiles Include="$(MSBuildThisFileDirectory)BannedSymbols.txt" Visible="false" />
  </ItemGroup>

</Project>
