From e8444484ccfe449c2385117a91a4af2e115d91b0 Mon Sep 17 00:00:00 2001 From: Max Katz Date: Sun, 24 Sep 2023 23:40:29 -0700 Subject: [PATCH 1/2] Bump minimal TFM for mobile projects from .NET 6 to .NET 7 because of MAUI support policy --- .../ControlCatalog.Android.csproj | 18 +----------------- .../ControlCatalog.iOS.csproj | 9 +-------- .../MobileSandbox.Android.csproj | 19 +------------------ .../MobileSandbox.iOS.csproj | 4 ---- .../SafeAreaDemo.iOS/SafeAreaDemo.iOS.csproj | 6 +----- .../Avalonia.Android/Avalonia.Android.csproj | 2 +- src/iOS/Avalonia.iOS/Avalonia.iOS.csproj | 2 +- 7 files changed, 6 insertions(+), 54 deletions(-) diff --git a/samples/ControlCatalog.Android/ControlCatalog.Android.csproj b/samples/ControlCatalog.Android/ControlCatalog.Android.csproj index f668067f807..a18693f38e6 100644 --- a/samples/ControlCatalog.Android/ControlCatalog.Android.csproj +++ b/samples/ControlCatalog.Android/ControlCatalog.Android.csproj @@ -1,6 +1,6 @@  - net6.0-android + net7.0-android 21 Exe enable @@ -10,28 +10,12 @@ apk true - - - - - Resources\drawable\Icon.png - - True - - - - True True diff --git a/samples/ControlCatalog.iOS/ControlCatalog.iOS.csproj b/samples/ControlCatalog.iOS/ControlCatalog.iOS.csproj index b4dac5399cf..9826824c3c7 100644 --- a/samples/ControlCatalog.iOS/ControlCatalog.iOS.csproj +++ b/samples/ControlCatalog.iOS/ControlCatalog.iOS.csproj @@ -2,15 +2,8 @@ Exe manual - net6.0-ios + net7.0-ios 13.0 - - True - iossimulator-x64 - - - - iPhone Developer diff --git a/samples/MobileSandbox.Android/MobileSandbox.Android.csproj b/samples/MobileSandbox.Android/MobileSandbox.Android.csproj index 3b67d79f7b6..45481c8e86f 100644 --- a/samples/MobileSandbox.Android/MobileSandbox.Android.csproj +++ b/samples/MobileSandbox.Android/MobileSandbox.Android.csproj @@ -1,6 +1,6 @@  - net6.0-android + net7.0-android 21 Exe enable @@ -10,29 +10,12 @@ apk true - - - - - - Resources\drawable\Icon.png - - True - - - - True True diff --git a/samples/MobileSandbox.iOS/MobileSandbox.iOS.csproj b/samples/MobileSandbox.iOS/MobileSandbox.iOS.csproj index 1bb12652d0e..b7581f3ecd7 100644 --- a/samples/MobileSandbox.iOS/MobileSandbox.iOS.csproj +++ b/samples/MobileSandbox.iOS/MobileSandbox.iOS.csproj @@ -4,10 +4,6 @@ manual net6.0-ios 13.0 - - True - iossimulator-x64 - diff --git a/samples/SafeAreaDemo.iOS/SafeAreaDemo.iOS.csproj b/samples/SafeAreaDemo.iOS/SafeAreaDemo.iOS.csproj index 71365fe07d2..3fc1113011b 100644 --- a/samples/SafeAreaDemo.iOS/SafeAreaDemo.iOS.csproj +++ b/samples/SafeAreaDemo.iOS/SafeAreaDemo.iOS.csproj @@ -5,12 +5,8 @@ 10.0 manual enable - iossimulator-x64 - - - - + diff --git a/src/Android/Avalonia.Android/Avalonia.Android.csproj b/src/Android/Avalonia.Android/Avalonia.Android.csproj index d8b0c3d5342..a5990a5f101 100644 --- a/src/Android/Avalonia.Android/Avalonia.Android.csproj +++ b/src/Android/Avalonia.Android/Avalonia.Android.csproj @@ -1,6 +1,6 @@  - net6.0-android + net7.0-android 21 true true diff --git a/src/iOS/Avalonia.iOS/Avalonia.iOS.csproj b/src/iOS/Avalonia.iOS/Avalonia.iOS.csproj index f39070befcc..abb8f42977f 100644 --- a/src/iOS/Avalonia.iOS/Avalonia.iOS.csproj +++ b/src/iOS/Avalonia.iOS/Avalonia.iOS.csproj @@ -1,6 +1,6 @@  - net6.0-ios + net7.0-ios 13.0 true From 41bd66e1c3a86726eaf39cd5cc9204d91a58a6f4 Mon Sep 17 00:00:00 2001 From: Max Katz Date: Mon, 25 Sep 2023 00:32:28 -0700 Subject: [PATCH 2/2] Fix api diff --- nukebuild/ApiDiffValidation.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/nukebuild/ApiDiffValidation.cs b/nukebuild/ApiDiffValidation.cs index ecffce47cba..2a73dd278cf 100644 --- a/nukebuild/ApiDiffValidation.cs +++ b/nukebuild/ApiDiffValidation.cs @@ -13,6 +13,12 @@ public static class ApiDiffValidation { private static readonly HttpClient s_httpClient = new(); + private static readonly Dictionary<(string target, string asmName), (string target, string asmName)> s_assemblyRedirects = new() + { + [("net6.0-android31.0", "Avalonia.Android.dll")] = ("net7.0-android33.0", "Avalonia.Android.dll"), + [("net6.0-ios16.1", "Avalonia.iOS.dll")] = ("net7.0-ios16.1", "Avalonia.iOS.dll") + }; + public static async Task ValidatePackage( Tool apiCompatTool, string packagePath, string baselineVersion, string suppressionFilesFolder, bool updateSuppressionFile) @@ -58,8 +64,13 @@ public static async Task ValidatePackage( await baselineDll.entry.Open().CopyToAsync(baselineDllFile); } + if (!s_assemblyRedirects.TryGetValue((baselineDll.target, baselineDll.entry.Name), out var lookupPair)) + { + lookupPair = (baselineDll.target, baselineDll.entry.Name); + } + var targetDll = targetDlls.FirstOrDefault(e => - e.target == baselineDll.target && e.entry.Name == baselineDll.entry.Name); + e.target == lookupPair.target && e.entry.Name == lookupPair.asmName); if (targetDll.entry is null) { throw new InvalidOperationException($"Some assemblies are missing in the new package {packageId}: {baselineDll.entry.Name} for {baselineDll.target}");