<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>WinExe</OutputType>
    <TargetFramework>net10.0</TargetFramework>
    <ApplicationManifest>App.manifest</ApplicationManifest>
    <ApplicationIcon>App.ico</ApplicationIcon>
    <Version>$([System.IO.File]::ReadAllText("$(MSBuildProjectDirectory)\\..\\VERSION"))</Version>
    <AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
    <SuppressTrimAnalysisWarnings>true</SuppressTrimAnalysisWarnings>

    <Product>SourceGit</Product>
    <Description>OpenSource GIT client</Description>
    <Company>sourcegit-scm</Company>
    <Copyright>Copyright © $([System.DateTime]::Now.Year) sourcegit-scm.</Copyright>
    <PackageLicenseExpression>MIT</PackageLicenseExpression>
    <PackageProjectUrl>https://github.com/sourcegit-scm/sourcegit.git</PackageProjectUrl>
    <RepositoryUrl>https://github.com/sourcegit-scm/sourcegit.git</RepositoryUrl>
    <RepositoryType>Public</RepositoryType>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)' == 'Release' and '$(DisableAOT)' != 'true'">
    <PublishAot>true</PublishAot>
    <PublishTrimmed>true</PublishTrimmed>
    <TrimMode>link</TrimMode>
  </PropertyGroup>

  <PropertyGroup Condition="$([MSBuild]::IsOSPlatform('OSX'))">
    <SupportedOSPlatformVersion>13.0</SupportedOSPlatformVersion>
  </PropertyGroup>

  <PropertyGroup Condition="'$(DisableUpdateDetection)' == 'true'">
    <DefineConstants>$(DefineConstants);DISABLE_UPDATE_DETECTION</DefineConstants>
  </PropertyGroup>

  <ItemGroup>
    <AssemblyMetadata Include="BuildDate" Value="$([System.DateTime]::Now.ToString('o'))" />
  </ItemGroup>

  <ItemGroup>
    <AvaloniaResource Include="App.ico" />
    <AvaloniaResource Include="Resources/Fonts/*" />
    <AvaloniaResource Include="Resources/Grammars/*" />
    <AvaloniaResource Include="Resources/Images/*" />
    <AvaloniaResource Include="Resources/Images/ExternalToolIcons/*" />
    <AvaloniaResource Include="Resources/Images/ExternalToolIcons/JetBrains/*" />
    <AvaloniaResource Include="Resources/Images/ShellIcons/*" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="Avalonia" Version="11.3.13" />
    <PackageReference Include="Avalonia.Controls.DataGrid" Version="11.3.13" />
    <PackageReference Include="Avalonia.Desktop" Version="11.3.13" />
    <PackageReference Include="Avalonia.Fonts.Inter" Version="11.3.13" />
    <PackageReference Include="Avalonia.Themes.Fluent" Version="11.3.13" />
    <PackageReference Include="Avalonia.Diagnostics" Version="11.3.13" Condition="'$(Configuration)' == 'Debug'" />
    <PackageReference Include="Azure.AI.OpenAI" Version="2.9.0-beta.1" />
    <PackageReference Include="BitMiracle.LibTiff.NET" Version="2.4.660" />
    <PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.2" />
    <PackageReference Include="LiveChartsCore.SkiaSharpView.Avalonia" Version="2.0.0" />
    <PackageReference Include="OpenAI" Version="2.10.0" />
    <PackageReference Include="Pfim" Version="0.11.4" />

    <ProjectReference Include="../depends/AvaloniaEdit/src/AvaloniaEdit.TextMate/AvaloniaEdit.TextMate.csproj" />
  </ItemGroup>

  <ItemGroup>
    <TrimmerRootAssembly Include="SourceGit" />
    <TrimmerRootAssembly Include="Avalonia.Themes.Fluent" />
  </ItemGroup>
</Project>
