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

  <PropertyGroup>
    <IsPackable>true</IsPackable>
    <Authors>Alexander Shabarshov</Authors>
    <Description>
        Audio engine core for ABStemPlayer. Audio pipeline.
    </Description>
    <PackageProjectUrl>https://github.com/unclshura/ABStemPlayer</PackageProjectUrl>
    <PackageTags>audio, player, ab, guitar, drums, piano, stem, mixer, c#</PackageTags>
    <PackageReadmeFile>README.md</PackageReadmeFile>
  </PropertyGroup>

  <!-- DEBUG CONFIGURATION -->
  <PropertyGroup Condition="'$(Configuration)' == 'Debug'">
    <Optimize>false</Optimize>
    <SelfContained>false</SelfContained>
    <PublishSingleFile>false</PublishSingleFile>
    <PublishTrimmed>false</PublishTrimmed>
    <IncludeNativeLibrariesForSelfExtract>false</IncludeNativeLibrariesForSelfExtract>
    <PublishReadyToRun>false</PublishReadyToRun>
  </PropertyGroup>

  <!-- RELEASE CONFIGURATION -->
  <PropertyGroup Condition="'$(Configuration)' == 'Release'">
    <Optimize>true</Optimize>
    <EnableAVX2>true</EnableAVX2>
    <DebugType>none</DebugType>
    <DebugSymbols>false</DebugSymbols>
    <IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
    <PublishReadyToRun>true</PublishReadyToRun>
  </PropertyGroup>

  <PropertyGroup>
    <Version>1.0.0</Version>
    <InformationalVersion>$(Version).$(BuildNumber)+$(SourceRevisionId)</InformationalVersion>
    <AssemblyVersion>$(Version)</AssemblyVersion>
    <FileVersion>$(Version).$(BuildNumber)</FileVersion>
  </PropertyGroup>

    <Target Name="RemoveUnwantedFiles" AfterTargets="Publish" Condition="'$(Configuration)' == 'Release'">
    <ItemGroup>
      <FilesToDelete Include="$(PublishDir)**\*.pdb" />
      <FilesToDelete Include="$(PublishDir)**\*.lib" />
    </ItemGroup>

    <Delete Files="@(FilesToDelete)" />
  </Target>

  <ItemGroup>
    <PackageReference Include="Microsoft.Extensions.DependencyInjection" />
    <PackageReference Include="Microsoft.ML.OnnxRuntime.DirectML" />
    <PackageReference Include="NAudio" />
  </ItemGroup>

  <ItemGroup>
    <Content Include="Data/*.*">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
  </ItemGroup>

</Project>
