From 592c918dc4471700e9e65112993a59527a45fcd6 Mon Sep 17 00:00:00 2001 From: Peter Collins Date: Thu, 17 Oct 2024 17:28:39 -0400 Subject: [PATCH 01/10] Update facebook to net9.0, cut NativeLibraryInterop.BuildTasks --- .github/workflows/build.yml | 33 ++-- Directory.Build.props | 10 - facebook/README.md | 4 +- .../Facebook.Android.Binding.csproj | 16 +- .../native/mauifacebook/build.gradle.kts | 14 +- .../Facebook.MaciOS.Binding.csproj | 18 +- facebook/sample/App.xaml.cs | 5 +- facebook/sample/Sample.csproj | 47 +++-- nuget.config | 7 - .../BindingToolTaskTests.cs | 53 ----- ...tiveLibraryInterop.BuildTasks.Tests.csproj | 24 --- .../MockBuildEngine.cs | 96 --------- .../SharpieTaskTests.cs | 32 --- ...t.Maui.NativeLibraryInterop.BuildTasks.sln | 31 --- ...aui.NativeLibraryInterop.BuildTasks.csproj | 48 ----- .../MSBuildExtensions.cs | 38 ---- .../Tasks/BindingToolTask.cs | 59 ------ .../Tasks/Gradle.cs | 47 ----- .../Tasks/Sharpie.cs | 54 ----- .../Tasks/XcodeBuild.cs | 43 ---- .../targets/Common.android.targets | 77 -------- .../targets/Common.macios.targets | 187 ------------------ .../targets/Common.props | 9 - ...ui.NativeLibraryInterop.BuildTasks.targets | 9 - .../native/newbinding/build.gradle.kts | 16 -- template/sample/MauiSample.csproj | 15 +- 26 files changed, 65 insertions(+), 927 deletions(-) delete mode 100644 Directory.Build.props delete mode 100644 nuget.config delete mode 100644 src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks.Tests/BindingToolTaskTests.cs delete mode 100644 src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks.Tests/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks.Tests.csproj delete mode 100644 src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks.Tests/MockBuildEngine.cs delete mode 100644 src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks.Tests/SharpieTaskTests.cs delete mode 100644 src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks.sln delete mode 100644 src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks.csproj delete mode 100644 src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks/MSBuildExtensions.cs delete mode 100644 src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks/Tasks/BindingToolTask.cs delete mode 100644 src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks/Tasks/Gradle.cs delete mode 100644 src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks/Tasks/Sharpie.cs delete mode 100644 src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks/Tasks/XcodeBuild.cs delete mode 100644 src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks/targets/Common.android.targets delete mode 100644 src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks/targets/Common.macios.targets delete mode 100644 src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks/targets/Common.props delete mode 100644 src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks/targets/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks.targets diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8d6defb..d71338e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,10 +15,19 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Use .NET 8.x + - name: Use .NET 9.x uses: actions/setup-dotnet@v4 with: - dotnet-version: '8.x' + dotnet-version: '9.x' + dotnet-quality: 'preview' + + # Temporarily install newer runtime for iOS binding projects + - name: Install .NET 9 RTM runtime + run: > + DOTNET_ROOT=~/.dotnet/ && + curl -L https://dot.net/v1/dotnet-install.sh --retry 5 --retry-max-time 300 > dotnet-install.sh && + chmod +x dotnet-install.sh && + ./dotnet-install.sh -c 9.0 -q daily --runtime dotnet - name: Install JDK 17 uses: actions/setup-java@v4 @@ -44,26 +53,6 @@ jobs: - name: Create logs dir run: mkdir -p ${{ runner.temp }}/logs/ - - name: Create local nupkg dir - run: mkdir -p ./src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks/bin/Release - - - name: Build and test build tasks - working-directory: ./src - run: >- - dotnet test CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks.sln - --logger trx --results-directory ${{ runner.temp }}/logs/TestResults-build-tasks - -bl:${{ runner.temp }}/logs/build-tasks.binlog - - - name: Pack build tasks - working-directory: ./src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks - run: dotnet pack CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks.csproj -bl:${{ runner.temp }}/logs/build-tasks-pack.binlog - - - name: Upload nupkg - uses: actions/upload-artifact@v4 - with: - name: nupkg - path: ./src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks/bin/Release/*.nupkg - - name: Build template working-directory: ./template run: dotnet build -bl:${{ runner.temp }}/logs/template.binlog diff --git a/Directory.Build.props b/Directory.Build.props deleted file mode 100644 index f423366..0000000 --- a/Directory.Build.props +++ /dev/null @@ -1,10 +0,0 @@ - - - - - latest - 17.9.5 - 0.0.1-pre1 - - - diff --git a/facebook/README.md b/facebook/README.md index a097f51..110697c 100644 --- a/facebook/README.md +++ b/facebook/README.md @@ -3,8 +3,8 @@ This folder contains a slim binding for the Facebook SDK which demonstrates simp ### Build and Run ```shell - dotnet build sample -t:Run -f net8.0-android - dotnet build sample -t:Run -f net8.0-ios + dotnet build sample -t:Run -f net9.0-android + dotnet build sample -t:Run -f net9.0-ios ``` ### Configure diff --git a/facebook/android/Facebook.Android.Binding/Facebook.Android.Binding.csproj b/facebook/android/Facebook.Android.Binding/Facebook.Android.Binding.csproj index b94a6ef..c0d316f 100644 --- a/facebook/android/Facebook.Android.Binding/Facebook.Android.Binding.csproj +++ b/facebook/android/Facebook.Android.Binding/Facebook.Android.Binding.csproj @@ -1,25 +1,25 @@ - net8.0-android + net9.0-android 21 enable enable + + true Facebook - false - - - - - + mauifacebook - + \ No newline at end of file diff --git a/facebook/android/native/mauifacebook/build.gradle.kts b/facebook/android/native/mauifacebook/build.gradle.kts index df08b1b..82bd124 100644 --- a/facebook/android/native/mauifacebook/build.gradle.kts +++ b/facebook/android/native/mauifacebook/build.gradle.kts @@ -25,21 +25,9 @@ android { } } -configurations { - create("copyDependencies") -} - dependencies { implementation("androidx.appcompat:appcompat:1.6.1") implementation("com.google.android.material:material:1.11.0") - implementation("com.facebook.android:facebook-android-sdk:latest.release") - "copyDependencies"("com.facebook.android:facebook-android-sdk:latest.release") + implementation("com.facebook.android:facebook-android-sdk:17.0.2") } -project.afterEvaluate { - tasks.register("copyDeps") { - from(configurations["copyDependencies"]) - into("${buildDir}/outputs/deps") - } - tasks.named("preBuild") { finalizedBy("copyDeps") } -} diff --git a/facebook/macios/Facebook.MaciOS.Binding/Facebook.MaciOS.Binding.csproj b/facebook/macios/Facebook.MaciOS.Binding/Facebook.MaciOS.Binding.csproj index 7909a9f..79757ac 100644 --- a/facebook/macios/Facebook.MaciOS.Binding/Facebook.MaciOS.Binding.csproj +++ b/facebook/macios/Facebook.MaciOS.Binding/Facebook.MaciOS.Binding.csproj @@ -1,26 +1,26 @@ - net8.0-ios + net9.0-ios enable true true - - - - + + true + - + MauiFacebook - Facebook - true - + diff --git a/facebook/sample/App.xaml.cs b/facebook/sample/App.xaml.cs index 949e39d..9a84d1e 100644 --- a/facebook/sample/App.xaml.cs +++ b/facebook/sample/App.xaml.cs @@ -5,7 +5,10 @@ public partial class App : Application public App() { InitializeComponent(); + } - MainPage = new AppShell(); + protected override Window CreateWindow(IActivationState? activationState) + { + return new Window(new AppShell()); } } \ No newline at end of file diff --git a/facebook/sample/Sample.csproj b/facebook/sample/Sample.csproj index a0d1631..6db317d 100644 --- a/facebook/sample/Sample.csproj +++ b/facebook/sample/Sample.csproj @@ -1,7 +1,7 @@  - net8.0-ios;net8.0-android + net9.0-android;net9.0-ios + None + + 15.0 + 15.0 21.0 10.0.17763.0 10.0.17763.0 @@ -36,25 +39,25 @@ - + - + - - + + - + - + - - + + @@ -63,19 +66,15 @@ - - - false - false - - - false - false - - - false - false - + + + + + + + + diff --git a/nuget.config b/nuget.config deleted file mode 100644 index e9a01ac..0000000 --- a/nuget.config +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks.Tests/BindingToolTaskTests.cs b/src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks.Tests/BindingToolTaskTests.cs deleted file mode 100644 index f9592d3..0000000 --- a/src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks.Tests/BindingToolTaskTests.cs +++ /dev/null @@ -1,53 +0,0 @@ -using FluentAssertions; -using CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks; -using NUnit.Framework; - -namespace CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks.Tests -{ - [TestFixture] - public class BindingToolTaskTests - { - MockBuildEngine engine = new MockBuildEngine(); - - public class DotnetToolOutputTestTask : BindingToolTask - { - public override string TaskPrefix { get; } = "DTOT"; - protected override string ToolName => "dotnet"; - protected override string GenerateFullPathToTool() => ToolExe; - public string CommandLineArgs { get; set; } = "--info"; - protected override string GenerateCommandLineCommands() => CommandLineArgs; - } - - [SetUp] - public void Setup() - { - engine.ClearEvents(); - } - - [Test] - [TestCase("invalidcommand", false, "You intended to execute a .NET program, but dotnet-invalidcommand does not exist.")] - [TestCase("--info", true, "")] - public void ShouldRunAndLogOnError(string args, bool expectedResult, string expectedErrorText) - { - var task = new DotnetToolOutputTestTask() - { - BuildEngine = engine, - CommandLineArgs = args, - }; - var taskSucceeded = task.Execute(); - taskSucceeded.Should().Be(expectedResult, "Task execution did not return expected value."); - - if (taskSucceeded) - { - engine.Errors.Should().BeEmpty("Successful task should not have any errors."); - } - else - { - engine.Errors.Should().NotBeEmpty("Task expected to fail should have errors."); - engine.Errors[0].Code.Should().Be("MSB6006"); - engine.Errors[1].Code.Should().Be("DTOT0000"); - engine.Errors[1].Message.Should().Contain(expectedErrorText); - } - } - } -} diff --git a/src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks.Tests/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks.Tests.csproj b/src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks.Tests/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks.Tests.csproj deleted file mode 100644 index 59bf400..0000000 --- a/src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks.Tests/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks.Tests.csproj +++ /dev/null @@ -1,24 +0,0 @@ - - - - Exe - net8.0 - enable - enable - major - - - - - - - - - - - - - - - - diff --git a/src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks.Tests/MockBuildEngine.cs b/src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks.Tests/MockBuildEngine.cs deleted file mode 100644 index 1223ccf..0000000 --- a/src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks.Tests/MockBuildEngine.cs +++ /dev/null @@ -1,96 +0,0 @@ -using System.Collections; -using Microsoft.Build.Framework; -using NUnit.Framework; - -namespace CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks.Tests -{ - public class MockBuildEngine : IBuildEngine4 - { - public int ColumnNumberOfTaskNode { get; set; } - - public bool ContinueOnError { get; set; } - - public int LineNumberOfTaskNode { get; set; } - - public string ProjectFileOfTaskNode => "test.xml"; - - public IList CustomEvents { get; set; } = new List(); - - public IList Errors { get; set; } = new List(); - - public IList Messages { get; set; } = new List(); - - public IList Warnings { get; set; } = new List(); - - Dictionary RegisteredTaskObjects { get; } = new Dictionary(); - - int RegisteredTaskObjectsQueries = 0; - - public bool IsRunningMultipleNodes => false; - - public TextWriter Output { get; set; } = Console.Out; - - public void ClearEvents() - { - CustomEvents.Clear(); - Errors.Clear(); - Messages.Clear(); - Warnings.Clear(); - } - - public void LogCustomEvent(CustomBuildEventArgs e) - { - Output.WriteLine($"Custom: {e.Message}"); - CustomEvents.Add(e); - } - - public void LogErrorEvent(BuildErrorEventArgs e) - { - Output.WriteLine($"Error: {e.Message}"); - Errors.Add(e); - } - - public void LogMessageEvent(BuildMessageEventArgs e) - { - Output.WriteLine($"Message: {e.Message}"); - Messages.Add(e); - } - - public void LogWarningEvent(BuildWarningEventArgs e) - { - Output.WriteLine($"Warning: {e.Message}"); - Warnings.Add(e); - } - - public virtual object? GetRegisteredTaskObject(object key, RegisteredTaskObjectLifetime lifetime) - { - RegisteredTaskObjectsQueries++; - RegisteredTaskObjects.TryGetValue(key, out object? ret); - return ret; - } - - public void RegisterTaskObject(object key, object obj, RegisteredTaskObjectLifetime lifetime, bool allowEarlyCollection) - { - RegisteredTaskObjects.Add(key, obj); - } - - public object UnregisterTaskObject(object key, RegisteredTaskObjectLifetime lifetime) - { - var obj = RegisteredTaskObjects[key]; - RegisteredTaskObjects.Remove(key); - return obj; - } - - public void Yield() { } - - public void Reacquire() { } - - public bool BuildProjectFile(string projectFileName, string[] targetNames, IDictionary globalProperties, IDictionary targetOutputs) => true; - - public bool BuildProjectFile(string projectFileName, string[] targetNames, IDictionary globalProperties, IDictionary targetOutputs, string toolsVersion) => true; - - public BuildEngineResult BuildProjectFilesInParallel(string[] projectFileNames, string[] targetNames, IDictionary[] globalProperties, IList[] removeGlobalProperties, string[] toolsVersion, bool returnTargetOutputs) => new(); - - public bool BuildProjectFilesInParallel(string[] projectFileNames, string[] targetNames, IDictionary[] globalProperties, IDictionary[] targetOutputsPerProject, string[] toolsVersion, bool useResultsCache, bool unloadProjectsOnCompletion) => true; - } -} diff --git a/src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks.Tests/SharpieTaskTests.cs b/src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks.Tests/SharpieTaskTests.cs deleted file mode 100644 index e6ccacf..0000000 --- a/src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks.Tests/SharpieTaskTests.cs +++ /dev/null @@ -1,32 +0,0 @@ -using FluentAssertions; -using CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks; -using NUnit.Framework; - -namespace CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks.Tests -{ - [TestFixture] - public class SharpieTaskTests - { - MockBuildEngine engine = new MockBuildEngine(); - - [SetUp] - public void Setup() - { - engine.ClearEvents(); - } - - [Test] - public void ShouldRunSuccessfully() - { - var task = new Sharpie() - { - BuildEngine = engine, - Arguments = "xcode -sdks -x /Applications/Xcode.app", - }; - - var taskSucceeded = task.Execute(); - taskSucceeded.Should().Be(true, "Task should complete successfully."); - task.ConsoleOutput.Should().Contain("iphoneos", "Sharpie 'xcode -sdks' output should contain at least one 'iphoneos' entry."); - } - } -} diff --git a/src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks.sln b/src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks.sln deleted file mode 100644 index 60b588a..0000000 --- a/src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks.sln +++ /dev/null @@ -1,31 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.11.34809.278 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks", "CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks\CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks.csproj", "{D1497B0B-A62D-49AD-833B-EFE4F87B1BEE}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks.Tests", "CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks.Tests\CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks.Tests.csproj", "{7BF30708-BC47-4379-8DC0-E7093AC2FED6}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {D1497B0B-A62D-49AD-833B-EFE4F87B1BEE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D1497B0B-A62D-49AD-833B-EFE4F87B1BEE}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D1497B0B-A62D-49AD-833B-EFE4F87B1BEE}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D1497B0B-A62D-49AD-833B-EFE4F87B1BEE}.Release|Any CPU.Build.0 = Release|Any CPU - {7BF30708-BC47-4379-8DC0-E7093AC2FED6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7BF30708-BC47-4379-8DC0-E7093AC2FED6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7BF30708-BC47-4379-8DC0-E7093AC2FED6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7BF30708-BC47-4379-8DC0-E7093AC2FED6}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {4D467CE9-10CC-4EBD-B51D-B4B3643492AE} - EndGlobalSection -EndGlobal diff --git a/src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks.csproj b/src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks.csproj deleted file mode 100644 index 9a1a0ce..0000000 --- a/src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks.csproj +++ /dev/null @@ -1,48 +0,0 @@ - - - - netstandard2.0 - enable - enable - - - - CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks - Toolkit with build tasks and extensions that support .NET MAUI slim binding projects - Microsoft - Microsoft - © Microsoft Corporation. All rights reserved. - MIT - https://github.com/Redth/DotNet.Platform.SlimBindings - https://github.com/Redth/DotNet.Platform.SlimBindings - CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks - CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks is a set of build tasks and extensions for .NET MAUI, .NET for Android, and .NET for iOS binding projects - nuget.png - $(AssemblyName) ($(TargetFramework)) - 1.0.0.0 - 1.0.0.0 - 0.0.1-pre1 - $(Version)$(VersionSuffix) - true - net,maui,netmaui,toolkit,kit,communitytoolkit,netmauitoolkit,mauicommunitytoolkit,slimbinding,binding - README.md - false - true - - - - - - - - - - - - - - - - - - diff --git a/src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks/MSBuildExtensions.cs b/src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks/MSBuildExtensions.cs deleted file mode 100644 index a9af1ba..0000000 --- a/src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks/MSBuildExtensions.cs +++ /dev/null @@ -1,38 +0,0 @@ -using Microsoft.Build.Utilities; - -namespace CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks -{ - public static class MSBuildExtensions - { - public static void LogCodedError(this TaskLoggingHelper log, string code, string message, params object[] messageArgs) - { - log.LogError( - subcategory: string.Empty, - errorCode: code, - helpKeyword: string.Empty, - file: string.Empty, - lineNumber: 0, - columnNumber: 0, - endLineNumber: 0, - endColumnNumber: 0, - message: message, - messageArgs: messageArgs); - } - - public static void LogCodedWarning(this TaskLoggingHelper log, string code, string message, params object [] messageArgs) - { - log.LogWarning( - subcategory: string.Empty, - warningCode: code, - helpKeyword: string.Empty, - file: string.Empty, - lineNumber: 0, - columnNumber: 0, - endLineNumber: 0, - endColumnNumber: 0, - message: message, - messageArgs: messageArgs); - } - - } -} diff --git a/src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks/Tasks/BindingToolTask.cs b/src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks/Tasks/BindingToolTask.cs deleted file mode 100644 index 0e902ed..0000000 --- a/src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks/Tasks/BindingToolTask.cs +++ /dev/null @@ -1,59 +0,0 @@ -using System.Text; - -using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; - -namespace CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks -{ - public abstract class BindingToolTask : ToolTask - { - public abstract string TaskPrefix { get; } - - public string WorkingDirectory { get; set; } = Directory.GetCurrentDirectory(); - - StringBuilder toolOutput = new StringBuilder(); - - [Output] - public string ConsoleOutput { get; set; } = string.Empty; - - public BindingToolTask() - { - } - - public override bool Execute() - { - try - { - bool taskResult = RunTask(); - if (!taskResult && !string.IsNullOrEmpty(toolOutput.ToString())) - { - Log.LogCodedError($"{TaskPrefix}0000", toolOutput.ToString().Trim()); - - } - ConsoleOutput = toolOutput.ToString(); - toolOutput.Clear(); - return taskResult; - } - catch (Exception ex) - { - Log.LogCodedError($"{TaskPrefix}0100", ex.ToString()); - return false; - } - } - - protected override void LogEventsFromTextOutput(string singleLine, MessageImportance messageImportance) - { - base.LogEventsFromTextOutput(singleLine, messageImportance); - toolOutput.AppendLine(singleLine); - } - - protected override string GetWorkingDirectory() - { - return WorkingDirectory; - } - - public virtual bool RunTask() => base.Execute(); - - protected object ProjectSpecificTaskObjectKey(object key) => (key, WorkingDirectory); - } -} diff --git a/src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks/Tasks/Gradle.cs b/src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks/Tasks/Gradle.cs deleted file mode 100644 index a50603d..0000000 --- a/src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks/Tasks/Gradle.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System; -using System.Diagnostics; -using System.Runtime.InteropServices; - -using Microsoft.Build.Framework; - -namespace CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks -{ - public class Gradle : BindingToolTask - { - public override string TaskPrefix => "GRDL"; - - protected override string ToolName => RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "gradlew.bat" : "gradlew"; - - - public string AndroidSdkDirectory { get; set; } = string.Empty; - - public string JavaSdkDirectory { get; set; } = string.Empty; - - public string Arguments { get; set; } = string.Empty; - - - public Gradle() - { - } - - protected override string GenerateFullPathToTool() - { - return Path.Combine(ToolPath, ToolExe); - } - - protected override string GenerateCommandLineCommands() => Arguments; - - protected override ProcessStartInfo GetProcessStartInfo(string pathToTool, string commandLineCommands, string responseFileSwitch) - { - ProcessStartInfo psi = base.GetProcessStartInfo(pathToTool, commandLineCommands, responseFileSwitch); - if (Directory.Exists(AndroidSdkDirectory)) - psi.Environment["ANDROID_HOME"] = AndroidSdkDirectory; - - if (Directory.Exists(JavaSdkDirectory)) - psi.Environment["JAVA_HOME"] = JavaSdkDirectory; - - return psi; - } - - } -} diff --git a/src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks/Tasks/Sharpie.cs b/src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks/Tasks/Sharpie.cs deleted file mode 100644 index d933761..0000000 --- a/src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks/Tasks/Sharpie.cs +++ /dev/null @@ -1,54 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -using Microsoft.Build.Framework; - -namespace CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks -{ - public class Sharpie : BindingToolTask - { - public override string TaskPrefix => "SHRP"; - - protected override string ToolName => "sharpie"; - - public string Arguments { get; set; } = string.Empty; - - - const string ClassicXIAssembly = "/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/64bits/iOS/Xamarin.iOS.dll"; - - public Sharpie() - { - } - - protected override string GenerateFullPathToTool() - { - return Path.Combine("/usr", "local", "bin", ToolExe); - } - - protected override string GenerateCommandLineCommands() => Arguments; - - public override bool RunTask() - { - if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) - { - if (!File.Exists (GenerateFullPathToTool ())) { - Log.LogCodedError($"{TaskPrefix}1000", "Unable to run `sharpie`, please install Objective-Sharpie. https://aka.ms/objective-sharpie."); - return false; - } - - if (!File.Exists (ClassicXIAssembly)) { - Log.LogCodedError($"{TaskPrefix}1001", "Unable to run `sharpie`, please install Xamarin.iOS. https://github.com/xamarin/xamarin-macios/blob/main/DOWNLOADS.md"); - return false; - } - - return base.RunTask(); - } - else - { - Log.LogCodedWarning($"{TaskPrefix}1010", "Unable to run `sharpie` on this platform. Please build this project on a macOS machine."); - return true; - } - } - - } -} diff --git a/src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks/Tasks/XcodeBuild.cs b/src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks/Tasks/XcodeBuild.cs deleted file mode 100644 index ac398db..0000000 --- a/src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks/Tasks/XcodeBuild.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -using Microsoft.Build.Framework; - -namespace CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks -{ - public class XcodeBuild : BindingToolTask - { - public override string TaskPrefix => "XCBD"; - - protected override string ToolName => "xcodebuild"; - - - public string Arguments { get; set; } = string.Empty; - - - public XcodeBuild() - { - } - - protected override string GenerateFullPathToTool() - { - return Path.Combine("/usr", "bin", ToolExe); - } - - protected override string GenerateCommandLineCommands() => Arguments; - - public override bool RunTask() - { - if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) - { - return base.RunTask(); - } - else - { - Log.LogCodedError($"{TaskPrefix}1000", "xcodebuild is not currently supported on this platform. Please build this project on a macOS machine."); - return false; - } - } - - } -} diff --git a/src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks/targets/Common.android.targets b/src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks/targets/Common.android.targets deleted file mode 100644 index 747da9a..0000000 --- a/src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks/targets/Common.android.targets +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - Release - bin/$(NLIGradleProjectConfiguration)/$(TargetFramework) - - - - - true - true - false - - - - - - - <_GradleInputs Include="$(MSBuildProjectFullPath)" /> - <_GradleInputs Include="%(NLIGradleProjectReference.FullPath)/**/*.java" /> - <_GradleInputs Include="%(NLIGradleProjectReference.FullPath)/**/*.gradle" /> - <_GradleInputs Include="%(NLIGradleProjectReference.FullPath)/**/*.xml" /> - <_GradleInputs Include="%(NLIGradleProjectReference.FullPath)/**/*.properties"/> - <_GradleInputs Remove="%(NLIGradleProjectReference.FullPath)/%(NLIGradleProjectReference.ModuleName)/$(NLIGradleProjectBuildDirectory)/**/*" /> - <_GradleOutputs Include="@(NLIGradleProjectReference->'%(FullPath)/%(ModuleName)/$(NLIGradleProjectBuildDirectory)/outputs/aar/%(ModuleName)-$(NLIGradleProjectConfiguration).aar')" /> - - - - - - - - - - - - - %(NLIGradleProjectReference.Bind) - %(NLIGradleProjectReference.Pack) - %(NLIGradleProjectReference.Visible) - - - - - - - - - - - - $(CleanDependsOn); - _CleanGradleProjects; - - - - - - - - - diff --git a/src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks/targets/Common.macios.targets b/src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks/targets/Common.macios.targets deleted file mode 100644 index 45e8e9a..0000000 --- a/src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks/targets/Common.macios.targets +++ /dev/null @@ -1,187 +0,0 @@ - - - - - - - - Release - bin/$(NLIXcodeProjectConfiguration)/$(TargetFramework) - obj/$(NLIXcodeProjectConfiguration)/$(TargetFramework) - - true - true - - false - - <_XcArchiveExtraArgs>$(_XcArchiveExtraArgs) ENABLE_BITCODE=NO SKIP_INSTALL=NO SWIFT_INSTALL_OBJC_HEADER=YES BUILD_LIBRARY_FOR_DISTRIBUTION=YES - <_XcArchiveExtraArgs>$(_XcArchiveExtraArgs) OTHER_LDFLAGS="-ObjC" OTHER_SWIFT_FLAGS="-no-verify-emitted-module-interface" OBJC_CFLAGS="-fno-objc-msgsend-selector-stubs -ObjC" - - - - - Framework - true - %(RootDir)%(Directory)$(NLIXcodeProjectBuildDirectory)/%(Filename)iOS.xcarchive - %(RootDir)%(Directory)$(NLIXcodeProjectBuildDirectory)/%(Filename)iOSSimulator.xcarchive - %(RootDir)%(Directory)$(NLIXcodeProjectBuildDirectory)/%(Filename)MacCatalyst.xcarchive - %(RootDir)%(Directory)$(NLIXcodeProjectCacheDirectory)/DerivedData - %(RootDir)%(Directory)$(NLIXcodeProjectCacheDirectory)/Cache - - - - - - - _BuildXcodeProjects; - _SharpieBindXcodeProjects; - $(CoreBuildDependsOn); - - - - - - <_XcbInputs Include="$(MSBuildProjectFullPath)" /> - <_XcbInputs Include="%(NLIXcodeProjectReference.RootDir)%(NLIXcodeProjectReference.Directory)**/*.swift" /> - <_XcbInputs Include="%(NLIXcodeProjectReference.RootDir)%(NLIXcodeProjectReference.Directory)**/*.h" /> - <_XcbInputs Include="%(NLIXcodeProjectReference.RootDir)%(NLIXcodeProjectReference.Directory)**/*.pbxproj" /> - <_XcbInputs Include="%(NLIXcodeProjectReference.RootDir)%(NLIXcodeProjectReference.Directory)**/*.xcworkspace"/> - <_XcbInputs Remove="%(NLIXcodeProjectReference.RootDir)%(NLIXcodeProjectReference.Directory)bin/**/*" /> - <_XcbInputs Remove="%(NLIXcodeProjectReference.RootDir)%(NLIXcodeProjectReference.Directory)obj/**/*" /> - <_XcbInputs Remove="%(NLIXcodeProjectReference.RootDir)%(NLIXcodeProjectReference.Directory)$(NLIXcodeProjectBuildDirectory)/**/*" /> - <_XcbInputs Remove="%(NLIXcodeProjectReference.RootDir)%(NLIXcodeProjectReference.Directory)$(NLIXcodeProjectCacheDirectory)/**/*" /> - <_XcbOutputs Include="@(NLIXcodeProjectReference->'%(RootDir)%(Directory)$(NLIXcodeProjectBuildDirectory)/%(Filename)_BuildXcodeProjects.stamp')" /> - - - - - - - - - - - - - <_CreateXcFxArgs Include="-create-xcframework" /> - <_CreateXcFxArgs Include="@(NLIXcodeProjectReference->'-archive %(XCArchiveiOS) -framework %(SchemeName).framework')" /> - <_CreateXcFxArgs Include="@(NLIXcodeProjectReference->'-archive %(XCArchiveiOSSimulator) -framework %(SchemeName).framework')" /> - <_CreateXcFxArgs Include="@(NLIXcodeProjectReference->'-output %(RootDir)%(Directory)$(NLIXcodeProjectBuildDirectory)/%(SchemeName)$(TargetPlatformIdentifier).xcframework')" /> - - - - - - - - - - - - - - - - <_CreateXcFxArgs Include="-create-xcframework" /> - <_CreateXcFxArgs Include="@(NLIXcodeProjectReference->'-archive %(XCArchiveMacCatalyst) -framework %(SchemeName).framework')" /> - <_CreateXcFxArgs Include="@(NLIXcodeProjectReference->'-output %(RootDir)%(Directory)$(NLIXcodeProjectBuildDirectory)/%(SchemeName)$(TargetPlatformIdentifier).xcframework')" /> - - - - - - - - - - - %(NLIXcodeProjectReference.Kind) - %(NLIXcodeProjectReference.SmartLink) - - - - - - - - - - <_SharpieInputs Include="%(NLIXcodeProjectReference.XCArchiveiOS)/**/*" Condition=" '$(XcodeBuildiOS)' == 'true' " /> - <_SharpieInputs Include="%(NLIXcodeProjectReference.XCArchiveMacCatalyst)/**/*" Condition=" '$(XcodeBuildiOS)' != 'true' and '$(XcodeBuildMacCatalyst)' == 'true' "/> - <_SharpieOutputs Include="@(NLIXcodeProjectReference->'%(RootDir)%(Directory)$(NLIXcodeProjectBuildDirectory)/sharpie/%(Filename)/_SharpieBindXcodeProjects.stamp')" /> - - - - - - - - - - - -x $(_XcodeSelectOutput.Replace(Contents/Developer, '')) - - - - - - - - $([System.Text.RegularExpressions.Regex]::Match($(_SharpieXcodeSdksOutput), `iphoneos[^; \n\r\t]+`)) - - - - <_ObjSharpieArgs Include="@(NLIXcodeProjectReference->'--output="%(RootDir)%(Directory)$(NLIXcodeProjectBuildDirectory)/sharpie/%(Filename)" --namespace=%(SharpieNamespace) --sdk=$(SharpieSdkName)')" /> - <_ObjSharpieArgs Condition=" '$(XcodeBuildiOS)' == 'true' " - Include="@(NLIXcodeProjectReference->'--scope="%(XCArchiveiOS)/Products/Library/Frameworks/%(SchemeName).framework/Headers" "%(XCArchiveiOS)/Products/Library/Frameworks/%(SchemeName).framework/Headers/%(SchemeName)-Swift.h"')" /> - <_ObjSharpieArgs Condition=" '$(XcodeBuildiOS)' != 'true' and '$(XcodeBuildMacCatalyst)' == 'true' " - Include="@(NLIXcodeProjectReference->'--scope="%(XCArchiveMacCatalyst)/Products/Library/Frameworks/%(SchemeName).framework/Headers" "%(XCArchiveMacCatalyst)/Products/Library/Frameworks/%(SchemeName).framework/Headers/%(SchemeName)-Swift.h"')" /> - - - - - - - - - - - - $(CleanDependsOn); - _CleanXcodeProjects; - - - - - - - - diff --git a/src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks/targets/Common.props b/src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks/targets/Common.props deleted file mode 100644 index d88cbbb..0000000 --- a/src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks/targets/Common.props +++ /dev/null @@ -1,9 +0,0 @@ - - - - - CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks.dll - $(USERPROFILE) - - - diff --git a/src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks/targets/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks.targets b/src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks/targets/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks.targets deleted file mode 100644 index ebb1a02..0000000 --- a/src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks/targets/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks.targets +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/template/android/native/newbinding/build.gradle.kts b/template/android/native/newbinding/build.gradle.kts index 20df328..6853e69 100644 --- a/template/android/native/newbinding/build.gradle.kts +++ b/template/android/native/newbinding/build.gradle.kts @@ -25,27 +25,11 @@ android { } } -// Create configuration for copyDependencies -configurations { - create("copyDependencies") -} - dependencies { // Add package dependency for binding library // Uncomment line below and replace {dependency.name.goes.here} with your dependency // implementation("{dependency.name.goes.here}") - // Copy dependencies for binding library - // Uncomment line below and replace {dependency.name.goes.here} with your dependency - // "copyDependencies"("{dependency.name.goes.here}") } -// Copy dependencies for binding library -project.afterEvaluate { - tasks.register("copyDeps") { - from(configurations["copyDependencies"]) - into("${buildDir}/outputs/deps") - } - tasks.named("preBuild") { finalizedBy("copyDeps") } -} diff --git a/template/sample/MauiSample.csproj b/template/sample/MauiSample.csproj index 824c636..ee6108f 100644 --- a/template/sample/MauiSample.csproj +++ b/template/sample/MauiSample.csproj @@ -69,12 +69,11 @@ - - - + + + From 5538db6a722f1d7206d6586b9a356714c6b5f479 Mon Sep 17 00:00:00 2001 From: Peter Collins Date: Fri, 18 Oct 2024 14:32:31 -0400 Subject: [PATCH 02/10] Continue net9.0 updates --- facebook/sample/Sample.csproj | 6 ------ firebase/README.md | 2 +- .../Firebase.MaciOS.Binding.csproj | 19 ++++++++--------- firebase/sample/App.xaml.cs | 5 ++++- firebase/sample/Sample.csproj | 17 +++++++-------- .../GoogleCast.MaciOS.Binding.csproj | 21 +++++++++---------- googlecast/sample/App.xaml.cs | 5 ++++- googlecast/sample/GoogleCast.Sample.csproj | 8 +++---- .../NewBinding.Android.Binding.csproj | 12 ++++------- .../NewBinding.MaciOS.Binding.csproj | 12 +++-------- template/sample/App.xaml.cs | 5 ++++- template/sample/MauiSample.csproj | 8 ++----- 12 files changed, 53 insertions(+), 67 deletions(-) diff --git a/facebook/sample/Sample.csproj b/facebook/sample/Sample.csproj index 6db317d..e5ff8cb 100644 --- a/facebook/sample/Sample.csproj +++ b/facebook/sample/Sample.csproj @@ -26,15 +26,9 @@ 1.0 1 - - None - 15.0 15.0 21.0 - 10.0.17763.0 - 10.0.17763.0 - 6.5 diff --git a/firebase/README.md b/firebase/README.md index 62bf2d3..6328d32 100644 --- a/firebase/README.md +++ b/firebase/README.md @@ -3,7 +3,7 @@ This folder contains a slim binding for the Firebase SDK which demonstrates simp ### Build and Run ```shell - dotnet build sample -t:Run -f net8.0-ios + dotnet build sample -t:Run -f net9.0-ios ``` ### Configure diff --git a/firebase/macios/Firebase.MaciOS.Binding/Firebase.MaciOS.Binding.csproj b/firebase/macios/Firebase.MaciOS.Binding/Firebase.MaciOS.Binding.csproj index 76a99f5..78b4975 100644 --- a/firebase/macios/Firebase.MaciOS.Binding/Firebase.MaciOS.Binding.csproj +++ b/firebase/macios/Firebase.MaciOS.Binding/Firebase.MaciOS.Binding.csproj @@ -1,27 +1,26 @@ - net8.0-ios;net8.0-maccatalyst + net9.0-ios;net9.0-maccatalyst enable true true - true - - - - + + true + - + MauiFirebase - Firebase - true - + diff --git a/firebase/sample/App.xaml.cs b/firebase/sample/App.xaml.cs index c456561..8bbb5f6 100644 --- a/firebase/sample/App.xaml.cs +++ b/firebase/sample/App.xaml.cs @@ -5,7 +5,10 @@ public partial class App : Application public App() { InitializeComponent(); + } - MainPage = new AppTabbedPage(); + protected override Window CreateWindow(IActivationState? activationState) + { + return new Window(new AppTabbedPage()); } } \ No newline at end of file diff --git a/firebase/sample/Sample.csproj b/firebase/sample/Sample.csproj index 96b024c..68a99f4 100644 --- a/firebase/sample/Sample.csproj +++ b/firebase/sample/Sample.csproj @@ -1,7 +1,8 @@  - net8.0-ios;net8.0-maccatalyst + net9.0-ios;net9.0-maccatalyst + 1.0 1 - None - - 13.0 - 13.1 + 15.0 + 15.0 @@ -51,10 +50,7 @@ - - - GoogleService-Info.plist - + @@ -62,6 +58,9 @@ + + GoogleService-Info.plist + diff --git a/googlecast/macios/GoogleCast.MaciOS.Binding/GoogleCast.MaciOS.Binding.csproj b/googlecast/macios/GoogleCast.MaciOS.Binding/GoogleCast.MaciOS.Binding.csproj index c98bce2..ff7e418 100644 --- a/googlecast/macios/GoogleCast.MaciOS.Binding/GoogleCast.MaciOS.Binding.csproj +++ b/googlecast/macios/GoogleCast.MaciOS.Binding/GoogleCast.MaciOS.Binding.csproj @@ -1,31 +1,30 @@ - net8.0-ios + net9.0-ios enable true true - $(BuildXcodeProjectsDependsOnTargets);NativeDependencies + + true + $(MaciOSPrepareForBuildDependsOn);DownloadNativeDependencies - - - - - + MauiGoogleCast - GoogleCast - false - + - + - + - + newbinding - + - - - - diff --git a/template/macios/NewBinding.MaciOS.Binding/NewBinding.MaciOS.Binding.csproj b/template/macios/NewBinding.MaciOS.Binding/NewBinding.MaciOS.Binding.csproj index afe7d35..296231c 100644 --- a/template/macios/NewBinding.MaciOS.Binding/NewBinding.MaciOS.Binding.csproj +++ b/template/macios/NewBinding.MaciOS.Binding/NewBinding.MaciOS.Binding.csproj @@ -1,6 +1,6 @@ - net8.0-ios;net8.0-maccatalyst + net9.0-ios;net9.0-maccatalyst enable true true @@ -19,19 +19,13 @@ - + NewBinding - NewBindingMaciOS - true - + - - - - diff --git a/template/sample/App.xaml.cs b/template/sample/App.xaml.cs index d046d8d..a066101 100644 --- a/template/sample/App.xaml.cs +++ b/template/sample/App.xaml.cs @@ -5,7 +5,10 @@ public partial class App : Application public App() { InitializeComponent(); + } - MainPage = new AppShell(); + protected override Window CreateWindow(IActivationState? activationState) + { + return new Window(new AppShell()); } } diff --git a/template/sample/MauiSample.csproj b/template/sample/MauiSample.csproj index ee6108f..79082bc 100644 --- a/template/sample/MauiSample.csproj +++ b/template/sample/MauiSample.csproj @@ -1,7 +1,7 @@  - net8.0-android;net8.0-ios;net8.0-maccatalyst + net9.0-android;net9.0-ios;net9.0-maccatalyst From f685008775af650ab7ccf63faf1cd98651247da2 Mon Sep 17 00:00:00 2001 From: Peter Collins Date: Fri, 18 Oct 2024 14:36:19 -0400 Subject: [PATCH 03/10] Fix actions syntax --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d71338e..2d6f6e2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,10 +24,10 @@ jobs: # Temporarily install newer runtime for iOS binding projects - name: Install .NET 9 RTM runtime run: > - DOTNET_ROOT=~/.dotnet/ && - curl -L https://dot.net/v1/dotnet-install.sh --retry 5 --retry-max-time 300 > dotnet-install.sh && - chmod +x dotnet-install.sh && - ./dotnet-install.sh -c 9.0 -q daily --runtime dotnet + DOTNET_ROOT=~/.dotnet/ && + curl -L https://dot.net/v1/dotnet-install.sh --retry 5 --retry-max-time 300 > dotnet-install.sh && + chmod +x dotnet-install.sh && + ./dotnet-install.sh -c 9.0 -q daily --runtime dotnet - name: Install JDK 17 uses: actions/setup-java@v4 From 5fc4abb0553c34b7a0b5a52ffb564130e7d9e22f Mon Sep 17 00:00:00 2001 From: Peter Collins Date: Fri, 18 Oct 2024 16:33:59 -0400 Subject: [PATCH 04/10] Use xcode 16 --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2d6f6e2..7042f22 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -35,8 +35,8 @@ jobs: distribution: microsoft java-version: 17 - - name: Use Xcode 15.4 - run: sudo xcode-select -s /Applications/Xcode_15.4.app/Contents/Developer + - name: Use Xcode 16.0 + run: sudo xcode-select -s /Applications/Xcode_16.app/Contents/Developer - name: Install MAUI run: dotnet workload install maui From af5e06984eb6e9f86e75763b6a35cc4eb46a462d Mon Sep 17 00:00:00 2001 From: Peter Collins Date: Mon, 11 Nov 2024 15:11:11 -0800 Subject: [PATCH 05/10] Bump gradle versions --- facebook/android/native/build.gradle.kts | 2 +- .../android/native/gradle/wrapper/gradle-wrapper.properties | 2 +- template/android/native/build.gradle.kts | 2 +- .../android/native/gradle/wrapper/gradle-wrapper.properties | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/facebook/android/native/build.gradle.kts b/facebook/android/native/build.gradle.kts index 9d58ad7..6e3f481 100644 --- a/facebook/android/native/build.gradle.kts +++ b/facebook/android/native/build.gradle.kts @@ -1,4 +1,4 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { - id("com.android.library") version "8.2.2" apply false + id("com.android.library") version "8.6.1" apply false } diff --git a/facebook/android/native/gradle/wrapper/gradle-wrapper.properties b/facebook/android/native/gradle/wrapper/gradle-wrapper.properties index a115c56..bffcf29 100644 --- a/facebook/android/native/gradle/wrapper/gradle-wrapper.properties +++ b/facebook/android/native/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Fri Feb 02 10:15:22 GMT 2024 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/template/android/native/build.gradle.kts b/template/android/native/build.gradle.kts index 9d58ad7..6e3f481 100644 --- a/template/android/native/build.gradle.kts +++ b/template/android/native/build.gradle.kts @@ -1,4 +1,4 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { - id("com.android.library") version "8.2.2" apply false + id("com.android.library") version "8.6.1" apply false } diff --git a/template/android/native/gradle/wrapper/gradle-wrapper.properties b/template/android/native/gradle/wrapper/gradle-wrapper.properties index 3d161df..ab0c921 100644 --- a/template/android/native/gradle/wrapper/gradle-wrapper.properties +++ b/template/android/native/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Mon Jun 24 14:49:07 EDT 2024 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From c5e1a01fdf69c04e3fd58505d3ec2a0eabd71313 Mon Sep 17 00:00:00 2001 From: Peter Collins Date: Wed, 13 Nov 2024 15:30:12 -0800 Subject: [PATCH 06/10] Install .NET 9 GA --- .github/workflows/build.yml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7042f22..7f39af6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,19 +15,10 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Use .NET 9.x + - name: Use .NET 9.0.x uses: actions/setup-dotnet@v4 with: - dotnet-version: '9.x' - dotnet-quality: 'preview' - - # Temporarily install newer runtime for iOS binding projects - - name: Install .NET 9 RTM runtime - run: > - DOTNET_ROOT=~/.dotnet/ && - curl -L https://dot.net/v1/dotnet-install.sh --retry 5 --retry-max-time 300 > dotnet-install.sh && - chmod +x dotnet-install.sh && - ./dotnet-install.sh -c 9.0 -q daily --runtime dotnet + dotnet-version: 9.0.x - name: Install JDK 17 uses: actions/setup-java@v4 From bdfbb48c0f0f9299cf24f0500389d7456b1246ef Mon Sep 17 00:00:00 2001 From: Peter Collins Date: Wed, 13 Nov 2024 15:33:04 -0800 Subject: [PATCH 07/10] Use macOS 15 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7f39af6..4d0330c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,7 @@ on: jobs: build: name: build - runs-on: macos-14 + runs-on: macos-15 steps: - name: Checkout uses: actions/checkout@v3 From 45911fa2043d8a6d8f0e4eb1951a324e7d78abdc Mon Sep 17 00:00:00 2001 From: Peter Collins Date: Thu, 14 Nov 2024 09:30:00 -0800 Subject: [PATCH 08/10] Install missing Android SDK components on macOS 15 image --- .github/workflows/build.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4d0330c..578e293 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,6 +26,12 @@ jobs: distribution: microsoft java-version: 17 + - name: Setup Android SDK + uses: android-actions/setup-android@v3 + with: + cmdline-tools-version: 11076708 + package: 'build-tools;35.0.0' + - name: Use Xcode 16.0 run: sudo xcode-select -s /Applications/Xcode_16.app/Contents/Developer From fcb271001b4011bef70333336ea05946d9c607e4 Mon Sep 17 00:00:00 2001 From: Peter Collins Date: Thu, 14 Nov 2024 09:33:03 -0800 Subject: [PATCH 09/10] Fix parameter name --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 578e293..1027936 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,7 +30,7 @@ jobs: uses: android-actions/setup-android@v3 with: cmdline-tools-version: 11076708 - package: 'build-tools;35.0.0' + packages: 'build-tools;35.0.0' - name: Use Xcode 16.0 run: sudo xcode-select -s /Applications/Xcode_16.app/Contents/Developer From 177fbf0ec2d7d74f9b47463af32446494386d83a Mon Sep 17 00:00:00 2001 From: Peter Collins Date: Thu, 14 Nov 2024 11:23:20 -0800 Subject: [PATCH 10/10] Update to GA package versions --- facebook/sample/Sample.csproj | 2 +- firebase/sample/Sample.csproj | 2 +- googlecast/sample/GoogleCast.Sample.csproj | 2 +- template/sample/MauiSample.csproj | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/facebook/sample/Sample.csproj b/facebook/sample/Sample.csproj index e5ff8cb..5cc3808 100644 --- a/facebook/sample/Sample.csproj +++ b/facebook/sample/Sample.csproj @@ -51,7 +51,7 @@ - + diff --git a/firebase/sample/Sample.csproj b/firebase/sample/Sample.csproj index 68a99f4..ca096a8 100644 --- a/firebase/sample/Sample.csproj +++ b/firebase/sample/Sample.csproj @@ -50,7 +50,7 @@ - + diff --git a/googlecast/sample/GoogleCast.Sample.csproj b/googlecast/sample/GoogleCast.Sample.csproj index 5850d41..030e28c 100644 --- a/googlecast/sample/GoogleCast.Sample.csproj +++ b/googlecast/sample/GoogleCast.Sample.csproj @@ -51,7 +51,7 @@ - + diff --git a/template/sample/MauiSample.csproj b/template/sample/MauiSample.csproj index 79082bc..8051d98 100644 --- a/template/sample/MauiSample.csproj +++ b/template/sample/MauiSample.csproj @@ -52,7 +52,7 @@ - +