Skip to content

Commit

Permalink
Added support for net7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
clm-unifly committed May 16, 2024
1 parent 18b3a8f commit 338f288
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 22 deletions.
28 changes: 15 additions & 13 deletions src/libs/Mapbox.Maui/Mapbox.Maui.csproj
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0-android;net6.0-ios;</TargetFrameworks>
<TargetFrameworks>net6.0-android;net6.0-ios;net7.0-android;net7.0-ios;</TargetFrameworks>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>

<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">14.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">15.4</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>
<RootNamespace>MapboxMaui</RootNamespace>
<SkipValidateMauiImplicitPackageReferences>true</SkipValidateMauiImplicitPackageReferences>
</PropertyGroup>

<PropertyGroup Condition="$(TargetFramework.Contains('-ios'))">
<RuntimeIdentifier>ios-arm64</RuntimeIdentifier>
</PropertyGroup>

<!-- Android -->
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<WarningLevel>4</WarningLevel>
Expand All @@ -22,21 +24,21 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<LangVersion>latestmajor</LangVersion>
</PropertyGroup>
<ItemGroup Condition="$(TargetFramework.StartsWith('net6.0-android')) != true">
<ItemGroup Condition="$(TargetFramework.Contains('-android')) != true">
<Compile Remove="**\**\*.Android.cs" />
</ItemGroup>

<!-- Both iOS and Mac Catalyst -->
<ItemGroup Condition="$(TargetFramework.StartsWith('net6.0-ios')) != true AND $(TargetFramework.StartsWith('net6.0-maccatalyst')) != true">
<ItemGroup Condition="$(TargetFramework.Contains('-ios')) != true AND $(TargetFramework.Contains('-maccatalyst')) != true">
<Compile Remove="**\**\*.MaciOS.cs" />
<None Include="**\**\*.MaciOS.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" />
</ItemGroup>

<!-- iOS -->
<ItemGroup Condition="$(TargetFramework.StartsWith('net6.0-ios')) != true">
<ItemGroup Condition="$(TargetFramework.Contains('-ios')) != true">
<Compile Remove="**\**\*.iOS.cs" />
</ItemGroup>
<ItemGroup Condition="$(TargetFramework.StartsWith('net6.0-ios')) == true">
<ItemGroup Condition="$(TargetFramework.Contains('-ios')) == true">
<Compile Include="**\**\*.iOS.cs" />
</ItemGroup>

Expand Down Expand Up @@ -68,10 +70,10 @@

<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">
<PackageReference Include="Com.Mapbox.Maps.Android" Version="10.11.1" />
<PackageReference Include="Xamarin.Kotlin.StdLib.Jdk8" Version="1.8.21.1" />
<PackageReference Include="Xamarin.Kotlin.StdLib.Jdk8" Version="1.9.0.1" />
<PackageReference Include="Square.OkHttp3" Version="4.10.0.1" />
<PackageReference Include="Xamarin.Kotlin.StdLib" Version="1.8.21.1" />
<PackageReference Include="Xamarin.AndroidX.Annotation" Version="1.6.0.2" />
<PackageReference Include="Xamarin.Kotlin.StdLib" Version="1.9.0.1" />
<PackageReference Include="Xamarin.AndroidX.Annotation" Version="1.6.0.4" />
</ItemGroup>

<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">
Expand Down
18 changes: 9 additions & 9 deletions src/qs/MapboxMauiQs/MapboxMauiQs.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>
<IsPackable>false</IsPackable>

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

Expand All @@ -21,12 +21,12 @@
<ApplicationDisplayVersion>1.0</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)')) == 'ios'">15.4</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>
</PropertyGroup>

<PropertyGroup Condition="$(TargetFramework.Contains('-ios'))">
<RuntimeIdentifier>ios-arm64</RuntimeIdentifier>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net7.0-ios|AnyCPU'">
Expand Down Expand Up @@ -75,10 +75,10 @@

<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">
<PackageReference Include="Com.Mapbox.Maps.Android" Version="10.11.1" />
<PackageReference Include="Xamarin.Kotlin.StdLib.Jdk8" Version="1.8.21.1" />
<PackageReference Include="Xamarin.Kotlin.StdLib.Jdk8" Version="1.9.0.1" />
<PackageReference Include="Square.OkHttp3" Version="4.10.0.1" />
<PackageReference Include="Xamarin.Kotlin.StdLib" Version="1.8.21.1" />
<PackageReference Include="Xamarin.AndroidX.Annotation" Version="1.6.0.2" />
<PackageReference Include="Xamarin.Kotlin.StdLib" Version="1.9.0.1" />
<PackageReference Include="Xamarin.AndroidX.Annotation" Version="1.6.0.4" />
</ItemGroup>
<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">
<PackageReference Include="MapboxMapsObjC.iOS" Version="10.11.1.1" />
Expand Down

0 comments on commit 338f288

Please sign in to comment.