<Project Sdk="Microsoft.NET.Sdk">

    <PropertyGroup>
        <TargetFrameworks>net6.0;netstandard2.0</TargetFrameworks>
        <EnableNETAnalyzers>true</EnableNETAnalyzers>
        <LangVersion>8</LangVersion>
        <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
        <CodeAnalysisTreatWarningsAsErrors>true</CodeAnalysisTreatWarningsAsErrors>
        <AnalysisMode>Recommended</AnalysisMode>
        <EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
        <Nullable>enable</Nullable>
        <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
        <TargetsForTfmSpecificBuildOutput>$(TargetsForTfmSpecificBuildOutput);GetAdditionalDlls</TargetsForTfmSpecificBuildOutput>
    </PropertyGroup>
    
    <PropertyGroup>
        <GeneratePackageOnBuild>true</GeneratePackageOnBuild>
        <PackageVersion>1.0.6</PackageVersion>
        <PackageProjectUrl>https://github.com/dns-technologies/ReportGenerator.BitbucketServerCodeCoverage</PackageProjectUrl>
        <RepositoryUrl>https://github.com/dns-technologies/ReportGenerator.BitbucketServerCodeCoverage</RepositoryUrl>
        <Copyright>Copyright (c) dns-technology 2023</Copyright>
        <RepositoryType>git</RepositoryType>
        <Authors>dns-technology</Authors>
        <PackageTags>code coverage;reportgenerator;bitbucket server;plugin</PackageTags>
        <PackageReadmeFile>README.md</PackageReadmeFile>
        <PackageLicenseFile>LICENSE</PackageLicenseFile>
        <PackageIcon>icon.png</PackageIcon>
        <Description>This is a custom report plugin for ReportGenerator tool which produces coverage data in a json format supported by Bitbucket Server Code Coverage plugin.</Description>
    </PropertyGroup>

    <ItemGroup>
      <PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="7.0.3">
        <PrivateAssets>all</PrivateAssets>
        <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
      </PackageReference>
      <PackageReference Include="Microsoft.Extensions.ObjectPool" Version="7.0.9" />
      <PackageReference Include="Nullable" Version="1.3.1">
        <PrivateAssets>all</PrivateAssets>
        <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
      </PackageReference>
      <PackageReference Include="ReportGenerator.Core" Version="5.1.23" />
    </ItemGroup>

    <ItemGroup>
        <None Include="..\LICENSE" Pack="true" PackagePath="">
        </None>
        <None Include="..\README.md" Pack="true" PackagePath="">
        </None>
        <None Include="..\icon.png" Pack="true" PackagePath="">
        </None>
    </ItemGroup>

    <Target Name="GetAdditionalDlls">
        <ItemGroup>
            <BuildOutputInPackage Include="$(OutputPath)Microsoft.Extensions.ObjectPool.dll">
            </BuildOutputInPackage>
        </ItemGroup>
    </Target>
    
</Project>
