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

	<PropertyGroup>
		<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
		<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
		<!-- <TargetFrameworks>$(TargetFrameworks);net8.0-tizen</TargetFrameworks> -->

		<!-- Note for MacCatalyst:
		The default runtime is maccatalyst-x64, except in Release config, in which case the default is maccatalyst-x64;maccatalyst-arm64.
		When specifying both architectures, use the plural <RuntimeIdentifiers> instead of the singular <RuntimeIdentifier>.
		The Mac App Store will NOT accept apps with ONLY maccatalyst-arm64 indicated;
		either BOTH runtimes must be indicated or ONLY macatalyst-x64. -->
		<!-- For example: <RuntimeIdentifiers>maccatalyst-x64;maccatalyst-arm64</RuntimeIdentifiers> -->

		<OutputType>Exe</OutputType>
		<RootNamespace>linker.app</RootNamespace>
		<UseMaui>true</UseMaui>
		<SingleProject>true</SingleProject>
		<ImplicitUsings>enable</ImplicitUsings>
		<Nullable>disable</Nullable>

		<EnablePreviewFeatures>true</EnablePreviewFeatures>

		<!-- Display name -->
		<ApplicationTitle>Linker</ApplicationTitle>

		<!-- App Identifier -->
		<ApplicationId>com.snltty.linker.app</ApplicationId>

		<Title>linker.app</Title>
		<Version>1.7.7</Version>
		<Authors>snltty</Authors>
		<Company>snltty</Company>
		<Copyright>snltty</Copyright>
		<Product>linker.app</Product>
		<PackageProjectUrl>https://github.com/snltty/linker</PackageProjectUrl>
		<RepositoryUrl>https://github.com/snltty/linker</RepositoryUrl>
		<PackageReleaseNotes>linker</PackageReleaseNotes>

		<!-- Versions -->
		<ApplicationDisplayVersion>1.7.7</ApplicationDisplayVersion>
		<ApplicationVersion>1</ApplicationVersion>

		<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">11.0</SupportedOSPlatformVersion>
		<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">13.1</SupportedOSPlatformVersion>
		<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
		<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
		<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
		<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>
		<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
		<PackageIcon>logo.png</PackageIcon>


	</PropertyGroup>

	<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net8.0-android|AnyCPU'">
		<DebugType>embedded</DebugType>
		<ApplicationId>com.snltty.linker.app</ApplicationId>
	</PropertyGroup>

	<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net8.0-ios|AnyCPU'">
		<DebugType>embedded</DebugType>
		<ApplicationId>com.snltty.linker.app</ApplicationId>
	</PropertyGroup>

	<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net8.0-maccatalyst|AnyCPU'">
		<DebugType>embedded</DebugType>
		<ApplicationId>com.snltty.linker.app</ApplicationId>
	</PropertyGroup>

	<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net8.0-windows10.0.19041.0|AnyCPU'">
		<DebugType>embedded</DebugType>
		<ApplicationId>com.snltty.linker.app</ApplicationId>
	</PropertyGroup>

	<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net8.0-android|AnyCPU'">
		<DebugType>embedded</DebugType>
		<ApplicationId>com.snltty.linker.app</ApplicationId>
		<AndroidPackageFormat>apk</AndroidPackageFormat>
	</PropertyGroup>

	<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net8.0-ios|AnyCPU'">
		<DebugType>embedded</DebugType>
		<ApplicationId>com.snltty.linker.app</ApplicationId>
	</PropertyGroup>

	<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net8.0-maccatalyst|AnyCPU'">
		<DebugType>embedded</DebugType>
		<ApplicationId>com.snltty.linker.app</ApplicationId>
	</PropertyGroup>

	<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net8.0-windows10.0.19041.0|AnyCPU'">
		<DebugType>embedded</DebugType>
		<ApplicationId>com.snltty.linker.app</ApplicationId>
	</PropertyGroup>

	<ItemGroup>
		<!-- App Icon -->
		<MauiIcon Include="Resources\AppIcon\appicon.png" />

		<!-- Splash Screen -->
		<MauiSplashScreen Include="Resources\Splash\splash.png" BaseSize="1024,1024" Color="#f5f5f5" />
		<!-- Images -->
		<MauiImage Include="Resources\Images\*" />

		<!-- Custom Fonts -->
		<MauiFont Include="Resources\Fonts\*" />

		<MauiAsset Include="public\**\*" />

		<!-- Raw Assets (also remove the "Resources\Raw" prefix) -->
		<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
	</ItemGroup>

	<ItemGroup>
	  <None Remove="Platforms\Android\Resources\xml\file_paths.xml" />
	  <None Remove="Platforms\Android\Resources\xml\network_security_config.xml" />
	</ItemGroup>

	<ItemGroup>
		<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
		<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="$(MauiVersion)" />
		<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
	</ItemGroup>

	<ItemGroup>
		<ProjectReference Include="..\linker.messenger.entry\linker.messenger.entry.csproj" />
	</ItemGroup>

	<ItemGroup>
		<MauiImage Update="Resources\Images\logo.png">
			<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
			<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
		</MauiImage>
	</ItemGroup>

	<ItemGroup>
	  <Folder Include="Resources\Raw\" />
	</ItemGroup>

</Project>
