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

  <!-- ProjectGuid is only included as a requirement for SonarQube analysis -->
  <PropertyGroup>
    <ProjectGuid>{E383961B-9356-4D5D-8233-9A1079D03055}</ProjectGuid>
  </PropertyGroup>

  <ItemGroup>
    <ProjectReference Include="..\Emby.Naming\Emby.Naming.csproj" />
    <ProjectReference Include="..\Jellyfin.Api\Jellyfin.Api.csproj" />
    <ProjectReference Include="..\Jellyfin.Server.Implementations\Jellyfin.Server.Implementations.csproj" />
    <ProjectReference Include="..\MediaBrowser.Model\MediaBrowser.Model.csproj" />
    <ProjectReference Include="..\MediaBrowser.Common\MediaBrowser.Common.csproj" />
    <ProjectReference Include="..\MediaBrowser.Controller\MediaBrowser.Controller.csproj" />
    <ProjectReference Include="..\MediaBrowser.Providers\MediaBrowser.Providers.csproj" />
    <ProjectReference Include="..\MediaBrowser.XbmcMetadata\MediaBrowser.XbmcMetadata.csproj" />
    <ProjectReference Include="..\MediaBrowser.LocalMetadata\MediaBrowser.LocalMetadata.csproj" />
    <ProjectReference Include="..\Emby.Photos\Emby.Photos.csproj" />
    <ProjectReference Include="..\src\Jellyfin.Drawing\Jellyfin.Drawing.csproj" />
    <ProjectReference Include="..\MediaBrowser.MediaEncoding\MediaBrowser.MediaEncoding.csproj" />
    <ProjectReference Include="..\src\Jellyfin.Database\Jellyfin.Database.Implementations\Jellyfin.Database.Implementations.csproj" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="BitFaster.Caching" />
    <PackageReference Include="DiscUtils.Udf" />
    <PackageReference Include="Microsoft.Data.Sqlite" />
    <PackageReference Include="Microsoft.Extensions.DependencyInjection" />
    <PackageReference Include="Microsoft.Extensions.Caching.Memory" />
    <PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" />
    <PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Relational" />
    <PackageReference Include="prometheus-net.DotNetRuntime" />
    <PackageReference Include="DotNet.Glob" />
  </ItemGroup>

  <ItemGroup>
    <Compile Include="..\SharedVersion.cs" />
  </ItemGroup>

  <PropertyGroup>
    <TargetFramework>net9.0</TargetFramework>
    <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
    <GenerateDocumentationFile>true</GenerateDocumentationFile>
  </PropertyGroup>

  <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
    <CodeAnalysisTreatWarningsAsErrors>false</CodeAnalysisTreatWarningsAsErrors>
  </PropertyGroup>

  <!-- Code Analyzers -->
  <ItemGroup Condition=" '$(Configuration)' == 'Debug' ">
    <!-- TODO: Add IDisposableAnalyzers -->
    <!-- <PackageReference Include="IDisposableAnalyzers">
      <PrivateAssets>all</PrivateAssets>
      <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
    </PackageReference> -->
    <PackageReference Include="Microsoft.CodeAnalysis.BannedApiAnalyzers">
      <PrivateAssets>all</PrivateAssets>
      <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
    </PackageReference>
    <PackageReference Include="SerilogAnalyzer" PrivateAssets="All" />
    <PackageReference Include="StyleCop.Analyzers" PrivateAssets="All" />
    <PackageReference Include="SmartAnalyzers.MultithreadingAnalyzer" PrivateAssets="All" />
  </ItemGroup>

  <ItemGroup>
    <EmbeddedResource Include="Localization\iso6392.txt" />
    <EmbeddedResource Include="Localization\countries.json" />
    <EmbeddedResource Include="Localization\Core\*.json" />
    <EmbeddedResource Include="Localization\Ratings\*.csv" />
  </ItemGroup>
</Project>
