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

    <PropertyGroup>
        <!-- Makes sure that we support all cultures for LDLocalizedString -->
        <PredefinedCulturesOnly>false</PredefinedCulturesOnly>
        <!-- ASP.NET MVC & Razor Pages don't support trimming yet (and everything else might also break) -->
        <PublishTrimmed>false</PublishTrimmed>
        <!-- Makes sure that we compile against the correct native dependency -->
        <UseCurrentRuntimeIdentifier>true</UseCurrentRuntimeIdentifier>
    </PropertyGroup>

    <Import Project="..\Iceshrimp.Build\Iceshrimp.Build.props" />
    <Import Project="..\Iceshrimp.Build\Iceshrimp.Build.targets" />

    <ItemGroup>
        <ProjectReference Include="..\Iceshrimp.Build\Iceshrimp.Build.csproj" PrivateAssets="all" Private="false" />
        <ProjectReference Include="..\Iceshrimp.Frontend\Iceshrimp.Frontend.csproj" />
        <ProjectReference Include="..\Iceshrimp.Parsing\Iceshrimp.Parsing.csproj" />
        <ProjectReference Include="..\Iceshrimp.Shared\Iceshrimp.Shared.csproj" />
    </ItemGroup>

    <ItemGroup>
        <PackageReference Include="AngleSharp" Version="1.2.0" />
        <PackageReference Include="AsyncKeyedLock" Version="7.1.4" />
        <PackageReference Include="CommunityToolkit.HighPerformance" Version="8.4.0" />
        <PackageReference Include="dotNetRdf.Core" Version="3.3.3-iceshrimp" />
        <PackageReference Include="EntityFrameworkCore.Exceptions.PostgreSQL" Version="8.1.3" />
        <PackageReference Include="EntityFrameworkCore.Projectables" Version="4.0.0" />
        <PackageReference Include="FlexLabs.EntityFrameworkCore.Upsert" Version="8.1.2" />
        <PackageReference Include="Iceshrimp.Assets.Fonts" Version="1.0.0" />
        <PackageReference Include="Iceshrimp.EntityFrameworkCore.Extensions" Version="1.0.2" />
        <PackageReference Include="Iceshrimp.ObjectStorage.S3" Version="0.34.3" />
        <PackageReference Include="Isopoh.Cryptography.Argon2" Version="2.0.0" />
        <PackageReference Include="JetBrains.Annotations" Version="2024.3.0" />
        <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="9.0.2" />
        <PackageReference Include="Microsoft.AspNetCore.DataProtection.EntityFrameworkCore" Version="9.0.2" />
        <PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="9.0.2" />
        <PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.MessagePack" Version="9.0.2" />
        <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.2">
            <PrivateAssets>all</PrivateAssets>
            <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
        </PackageReference>
        <PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="9.0.2" />
        <PackageReference Include="Microsoft.Extensions.Configuration.Ini" Version="9.0.2" />
        <PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="9.0.3" />
        <PackageReference Include="Otp.NET" Version="1.4.0" />
        <PackageReference Include="QRCoder" Version="1.6.0" />
        <PackageReference Include="Scalar.AspNetCore" Version="2.1.0" />
        <PackageReference Include="SixLabors.ImageSharp.Drawing" Version="2.1.5" />
        <PackageReference Include="SixLabors.ImageSharp" Version="3.1.8-iceshrimp" />
        <PackageReference Include="Swashbuckle.AspNetCore" Version="7.2.0" />
        <PackageReference Include="System.IO.Hashing" Version="9.0.2" />
        <PackageReference Include="System.Linq.Async" Version="6.0.1" />
        <PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
        <PackageReference Include="System.Text.Json" Version="9.0.2" />
        <PackageReference Include="Ulid" Version="1.3.4" />
        <PackageReference Include="Iceshrimp.Assets.Branding" Version="1.0.1" />
        <PackageReference Include="Iceshrimp.AssemblyUtils" Version="1.0.3" />
        <PackageReference Include="Iceshrimp.MfmSharp" Version="1.2.18" />
        <PackageReference Include="Iceshrimp.Utils.Common" Version="1.2.1" />
        <PackageReference Include="Iceshrimp.MimeTypes" Version="1.0.1" />
        <PackageReference Include="Iceshrimp.WebPush" Version="2.1.0" />
        <PackageReference Include="NetVips" Version="3.0.0" />
    </ItemGroup>

    <!-- Transitive dependency version overrides to patch security vulnerabilities -->
    <ItemGroup>
        <PackageReference Include="System.Private.Uri" Version="4.3.2" />
    </ItemGroup>

    <!-- If the build flag BundleNativeDeps is set, reference the LibVips native dependecy -->
    <ItemGroup Condition=" '$(BundleNativeDeps)' == 'true' ">
        <PackageReference Include="NetVips.Native" Version="8.15.2-iceshrimp" />
    </ItemGroup>

    <!-- This makes sure configuration.ini & the preloaded AS contexts are added to the assembly as embedded resources -->
    <ItemGroup>
        <EmbeddedResource Include="configuration.ini" CopyToOutputDirectory="Always" />
        <EmbeddedResource Include="Core\Federation\ActivityStreams\Contexts\*.json">
            <TargetPath>contexts\%(Filename)%(Extension)</TargetPath>
        </EmbeddedResource>
        <Content Update="Core\Federation\ActivityStreams\Contexts\*.json">
            <CopyToOutputDirectory>Never</CopyToOutputDirectory>
            <CopyToPublishDirectory>Never</CopyToPublishDirectory>
        </Content>
    </ItemGroup>

    <!-- This is a script used during development, and not needed in the final output -->
    <ItemGroup>
        <None Remove="Core\Database\prune-designer-cs-files.sh" />
    </ItemGroup>

    <!-- We don't want the assets LICENSE.md to be served as a file -->
    <ItemGroup>
        <Content Remove="wwwroot\assets\LICENSE.md" />
    </ItemGroup>

</Project>
