From f05221588ad2824419dedb318427501bae37f278 Mon Sep 17 00:00:00 2001 From: Carl Mathieu Date: Wed, 6 Dec 2023 14:51:11 -0500 Subject: [PATCH 1/2] feat!: update to uno 5 --- CHANGELOG.md | 3 ++ build/templates/dotnet-install.yml | 26 +++++++------ .../ApplicationTemplate.Access.csproj | 6 +-- .../ApplicationTemplate.Mobile.csproj | 38 +++++++++---------- .../ApplicationTemplate.Presentation.csproj | 20 +++++----- .../App.xaml.cs | 9 ++++- .../ApplicationTemplate.Windows.csproj | 29 +++++++------- .../Package.appxmanifest | 4 +- 8 files changed, 73 insertions(+), 62 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index da94b53ab..18b900e19 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) Prefix your items with `(Template)` if the change is about the template and not the resulting application. +## 3.0.X +- Updated to Uno 5 + ## 2.2.X - Added hooks for default analytics (page views and command invocations). - Renamed the `AnalyticsDataLoaderStrategy` to `MonitoringDataLoaderStrategy`. (The same renaming was applied to related methods and classes). diff --git a/build/templates/dotnet-install.yml b/build/templates/dotnet-install.yml index 7ec8de5c2..bbffc0dfc 100644 --- a/build/templates/dotnet-install.yml +++ b/build/templates/dotnet-install.yml @@ -1,15 +1,19 @@ parameters: -- name: installMobileWorkload - type: boolean - default: true + DotNetVersion: '7.0.400' + UnoCheck_Version: '1.17.0' + UnoCheck_Manifest: 'https://raw.githubusercontent.com/unoplatform/uno.check/262bebd06e916ec022b8fdc4a2a9df14f0554b92/manifests/uno.ui.manifest.json' steps: - - task: UseDotNet@2 - displayName: 'Install .NET SDK' - inputs: - packageType: 'sdk' - version: '7.0.203' +- task: UseDotNet@2 + displayName: 'Use .NET SDK ${{ parameters.DotNetVersion }}' + inputs: + packageType: 'sdk' + version: ${{ parameters.DotNetVersion }} - - powershell: dotnet workload install maui --source https://aka.ms/dotnet6/nuget/index.json --source https://api.nuget.org/v3/index.json - condition: ${{ parameters.installMobileWorkload }} - displayName: Install .NET MAUI Workload +- powershell: | + & dotnet tool update --global uno.check --version ${{ parameters.UnoCheck_Version }} --add-source https://api.nuget.org/v3/index.json + & uno-check -v --ci --non-interactive --fix --skip xcode --skip gtk3 --skip vswin --skip vsmac --skip androidsdk --skip androidemulator --manifest ${{ parameters.UnoCheck_Manifest }} + displayName: Install .NET Workloads | Uno-check + errorActionPreference: continue + ignoreLASTEXITCODE: true + retryCountOnTaskFailure: 3 \ No newline at end of file diff --git a/src/app/ApplicationTemplate.Access/ApplicationTemplate.Access.csproj b/src/app/ApplicationTemplate.Access/ApplicationTemplate.Access.csproj index ff5fa60c4..37abcaafe 100644 --- a/src/app/ApplicationTemplate.Access/ApplicationTemplate.Access.csproj +++ b/src/app/ApplicationTemplate.Access/ApplicationTemplate.Access.csproj @@ -20,13 +20,13 @@ - + - - + + diff --git a/src/app/ApplicationTemplate.Mobile/ApplicationTemplate.Mobile.csproj b/src/app/ApplicationTemplate.Mobile/ApplicationTemplate.Mobile.csproj index 1ac9b6814..f4be2d411 100644 --- a/src/app/ApplicationTemplate.Mobile/ApplicationTemplate.Mobile.csproj +++ b/src/app/ApplicationTemplate.Mobile/ApplicationTemplate.Mobile.csproj @@ -1,6 +1,6 @@  - 10.0 + 11.0 net7.0-android;net7.0-ios true true @@ -17,25 +17,25 @@ partial - - - - - - - - - + + + + + + + + + - - - - - - - - - + + + + + + + + + diff --git a/src/app/ApplicationTemplate.Presentation/ApplicationTemplate.Presentation.csproj b/src/app/ApplicationTemplate.Presentation/ApplicationTemplate.Presentation.csproj index d85c1e5f7..d48d0313f 100644 --- a/src/app/ApplicationTemplate.Presentation/ApplicationTemplate.Presentation.csproj +++ b/src/app/ApplicationTemplate.Presentation/ApplicationTemplate.Presentation.csproj @@ -26,16 +26,16 @@ - - - - - - - - - - + + + + + + + + + + diff --git a/src/app/ApplicationTemplate.Shared.Views/App.xaml.cs b/src/app/ApplicationTemplate.Shared.Views/App.xaml.cs index 6de3ea87b..787ee404e 100644 --- a/src/app/ApplicationTemplate.Shared.Views/App.xaml.cs +++ b/src/app/ApplicationTemplate.Shared.Views/App.xaml.cs @@ -4,6 +4,7 @@ using Microsoft.Extensions.Logging; using Microsoft.UI.Xaml; using Uno.Extensions; +using Uno.UI; using Windows.Graphics.Display; namespace ApplicationTemplate; @@ -74,11 +75,15 @@ private void InitializeAndStart() Startup.ShellActivity.Stop(); } -//-:cnd:noEmit + //-:cnd:noEmit #if __MOBILE__ CurrentWindow.Activate(); #endif -//+:cnd:noEmit + //+:cnd:noEmit + +#if DEBUG + CurrentWindow.EnableHotReload(); +#endif _ = Task.Run(() => Startup.Start()); } diff --git a/src/app/ApplicationTemplate.Windows/ApplicationTemplate.Windows.csproj b/src/app/ApplicationTemplate.Windows/ApplicationTemplate.Windows.csproj index c6198202d..df662d67c 100644 --- a/src/app/ApplicationTemplate.Windows/ApplicationTemplate.Windows.csproj +++ b/src/app/ApplicationTemplate.Windows/ApplicationTemplate.Windows.csproj @@ -1,6 +1,6 @@  - 10.0 + 11.0 WinExe net7.0-windows10.0.22621.0 10.0.19041.0 @@ -67,26 +67,25 @@ - - - - + + + + - - - + + + - - - + + + + - - - - + + diff --git a/src/app/ApplicationTemplate.Windows/Package.appxmanifest b/src/app/ApplicationTemplate.Windows/Package.appxmanifest index e907c3334..8d2fdb227 100644 --- a/src/app/ApplicationTemplate.Windows/Package.appxmanifest +++ b/src/app/ApplicationTemplate.Windows/Package.appxmanifest @@ -18,8 +18,8 @@ - - + + From 855e6dc35a0453efa7fc85f1e4e22065ef429a41 Mon Sep 17 00:00:00 2001 From: Carl Mathieu Date: Fri, 15 Dec 2023 11:53:46 -0500 Subject: [PATCH 2/2] fix: fix PR comments --- CHANGELOG.md | 2 +- build/templates/dotnet-install.yml | 2 +- src/app/ApplicationTemplate.Shared.Views/App.xaml.cs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 18b900e19..02d8c77ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) Prefix your items with `(Template)` if the change is about the template and not the resulting application. ## 3.0.X -- Updated to Uno 5 +- Updated to Uno 5. ## 2.2.X - Added hooks for default analytics (page views and command invocations). diff --git a/build/templates/dotnet-install.yml b/build/templates/dotnet-install.yml index bbffc0dfc..2978eb09b 100644 --- a/build/templates/dotnet-install.yml +++ b/build/templates/dotnet-install.yml @@ -13,7 +13,7 @@ steps: - powershell: | & dotnet tool update --global uno.check --version ${{ parameters.UnoCheck_Version }} --add-source https://api.nuget.org/v3/index.json & uno-check -v --ci --non-interactive --fix --skip xcode --skip gtk3 --skip vswin --skip vsmac --skip androidsdk --skip androidemulator --manifest ${{ parameters.UnoCheck_Manifest }} - displayName: Install .NET Workloads | Uno-check + displayName: Install .NET Workloads | Uno Check errorActionPreference: continue ignoreLASTEXITCODE: true retryCountOnTaskFailure: 3 \ No newline at end of file diff --git a/src/app/ApplicationTemplate.Shared.Views/App.xaml.cs b/src/app/ApplicationTemplate.Shared.Views/App.xaml.cs index 787ee404e..edaf26cef 100644 --- a/src/app/ApplicationTemplate.Shared.Views/App.xaml.cs +++ b/src/app/ApplicationTemplate.Shared.Views/App.xaml.cs @@ -75,11 +75,11 @@ private void InitializeAndStart() Startup.ShellActivity.Stop(); } - //-:cnd:noEmit +//-:cnd:noEmit #if __MOBILE__ CurrentWindow.Activate(); #endif - //+:cnd:noEmit +//+:cnd:noEmit #if DEBUG CurrentWindow.EnableHotReload();