Skip to content

Commit

Permalink
refa (Laerdal.Dfu.csproj): refine the logic used to check for which p…
Browse files Browse the repository at this point in the history
…latform we're building each time (android, ios, ...)

[skip ci]
  • Loading branch information
ksidirop-laerdal committed May 13, 2024
1 parent ad11ee6 commit a265491
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions Laerdal.Dfu/Laerdal.Dfu.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<!-- todo add support for maccatalyst -->
<TargetFrameworks>net7.0-ios;net7.0-android</TargetFrameworks>

<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>

<TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>

<SupportedOSPlatformVersion Condition=" $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios' ">14.2</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition=" $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android' ">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition=" '$(TargetPlatformIdentifier)' == 'ios' ">14.2</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition=" '$(TargetPlatformIdentifier)' == 'android' ">21.0</SupportedOSPlatformVersion>
</PropertyGroup>

<PropertyGroup>
Expand All @@ -29,11 +32,11 @@

<Import Project="Laerdal.targets"/>

<ItemGroup Condition="'$(TargetFramework)' == 'net7.0-android'">
<ItemGroup Condition=" '$(TargetPlatformIdentifier)' == 'android' ">
<PackageReference Include="Laerdal.Dfu.Bindings.Android" Version="2.3.0.43876"/>
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net7.0-ios'">
<ItemGroup Condition=" '$(TargetPlatformIdentifier)' == 'ios' or '$(TargetPlatformIdentifier)' == 'maccatalyst' ">
<PackageReference Include="Laerdal.Dfu.Bindings.iOS" Version="4.13.0.43915"/>
</ItemGroup>

Expand Down

0 comments on commit a265491

Please sign in to comment.