From 493c7a7088419f4df51de2c6c5ea0e4bf267e658 Mon Sep 17 00:00:00 2001 From: Ronan Burke Date: Sat, 14 Oct 2023 23:35:02 +0100 Subject: [PATCH 1/5] .NET 8 support --- .github/workflows/ci-demo-app.yml | 2 +- .github/workflows/ci.yml | 2 +- .github/workflows/release-nuget.yml | 2 +- README.md | 1 + samples/DemoApp/App.xaml.cs | 2 +- samples/DemoApp/DemoApp.csproj | 24 +++++++++---------- src/Burkus.Mvvm.Maui/Burkus.Mvvm.Maui.csproj | 2 +- .../Burkus.Mvvm.Maui.UnitTests.csproj | 2 +- .../DemoApp.UnitTests.csproj | 2 +- 9 files changed, 20 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci-demo-app.yml b/.github/workflows/ci-demo-app.yml index 1122b93..3b294f1 100644 --- a/.github/workflows/ci-demo-app.yml +++ b/.github/workflows/ci-demo-app.yml @@ -18,7 +18,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v2 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Install .NET MAUI run: dotnet workload install maui - name: Restore dependencies diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0b14602..2be5828 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v2 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Install .NET MAUI run: dotnet workload install maui - name: Restore dependencies diff --git a/.github/workflows/release-nuget.yml b/.github/workflows/release-nuget.yml index 6c33b6a..148adfb 100644 --- a/.github/workflows/release-nuget.yml +++ b/.github/workflows/release-nuget.yml @@ -19,7 +19,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v2 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Install .NET MAUI run: dotnet workload install maui - name: Get version information from tag diff --git a/README.md b/README.md index a644cce..5201c2d 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ - Be **easy to understand** and setup 📄 - The APIs and syntax are easy to setup & understand. - We are committed to providing comprehensive documentation this `README`. + - The library uses source generators to reduce boilerplate and setup time. No special base classes for `App` or `Pages` required. - Be **dependable** for the future 🔮 - `Burkus.Mvvm.Maui` is open source and released under the MIT license. No CLAs are required for contributors. - Individuals and businesses can fork the library if it ever falls short of their needs. diff --git a/samples/DemoApp/App.xaml.cs b/samples/DemoApp/App.xaml.cs index b2532ab..706d332 100644 --- a/samples/DemoApp/App.xaml.cs +++ b/samples/DemoApp/App.xaml.cs @@ -7,7 +7,7 @@ public App() InitializeComponent(); } -#if NET7_0_OR_GREATER && !ANDROID && !MACCATALYST && !IOS && !WINDOWS +#if NET8_0_OR_GREATER && !ANDROID && !MACCATALYST && !IOS && !WINDOWS // workaround for unit tests in Maui https://github.com/dotnet/maui/issues/3552#issuecomment-1172606125 public static void Main(string[] args) {} #endif diff --git a/samples/DemoApp/DemoApp.csproj b/samples/DemoApp/DemoApp.csproj index d509f54..b13b6b6 100644 --- a/samples/DemoApp/DemoApp.csproj +++ b/samples/DemoApp/DemoApp.csproj @@ -1,15 +1,15 @@ - - - - net7.0;net7.0-android;net7.0-ios;net7.0-maccatalyst - $(TargetFrameworks);net7.0-windows10.0.19041.0 - - - Exe - DemoApp - true - true - enable + + + + net8.0;net8.0-android;net8.0-ios;net8.0-maccatalyst + $(TargetFrameworks);net8.0-windows10.0.19041.0 + + + Exe + DemoApp + true + true + enable DemoApp diff --git a/src/Burkus.Mvvm.Maui/Burkus.Mvvm.Maui.csproj b/src/Burkus.Mvvm.Maui/Burkus.Mvvm.Maui.csproj index 418534a..5a3f195 100644 --- a/src/Burkus.Mvvm.Maui/Burkus.Mvvm.Maui.csproj +++ b/src/Burkus.Mvvm.Maui/Burkus.Mvvm.Maui.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 true enable enable diff --git a/tests/Burkus.Mvvm.Maui.UnitTests/Burkus.Mvvm.Maui.UnitTests.csproj b/tests/Burkus.Mvvm.Maui.UnitTests/Burkus.Mvvm.Maui.UnitTests.csproj index 1766400..519fb16 100644 --- a/tests/Burkus.Mvvm.Maui.UnitTests/Burkus.Mvvm.Maui.UnitTests.csproj +++ b/tests/Burkus.Mvvm.Maui.UnitTests/Burkus.Mvvm.Maui.UnitTests.csproj @@ -1,7 +1,7 @@  - net7.0 + net8.0 true enable enable diff --git a/tests/DemoApp.UnitTests/DemoApp.UnitTests.csproj b/tests/DemoApp.UnitTests/DemoApp.UnitTests.csproj index e6f8767..2da4ba0 100644 --- a/tests/DemoApp.UnitTests/DemoApp.UnitTests.csproj +++ b/tests/DemoApp.UnitTests/DemoApp.UnitTests.csproj @@ -1,7 +1,7 @@  - net7.0 + net8.0 true enable enable From d3656985714735106ae0308a73aac42661c858ac Mon Sep 17 00:00:00 2001 From: Ronan Burke Date: Tue, 14 Nov 2023 17:41:40 +0000 Subject: [PATCH 2/5] Further .NET8 changes --- samples/DemoApp/App.xaml.cs | 5 - samples/DemoApp/DemoApp.csproj | 29 +++--- src/Burkus.Mvvm.Maui/Burkus.Mvvm.Maui.csproj | 98 ++++++++++--------- .../Burkus.Mvvm.Maui.UnitTests.csproj | 55 +++++------ .../DemoApp.UnitTests.csproj | 85 ++++++++-------- 5 files changed, 136 insertions(+), 136 deletions(-) diff --git a/samples/DemoApp/App.xaml.cs b/samples/DemoApp/App.xaml.cs index 706d332..71a1f1f 100644 --- a/samples/DemoApp/App.xaml.cs +++ b/samples/DemoApp/App.xaml.cs @@ -6,9 +6,4 @@ public App() { InitializeComponent(); } - -#if NET8_0_OR_GREATER && !ANDROID && !MACCATALYST && !IOS && !WINDOWS - // workaround for unit tests in Maui https://github.com/dotnet/maui/issues/3552#issuecomment-1172606125 - public static void Main(string[] args) {} -#endif } \ No newline at end of file diff --git a/samples/DemoApp/DemoApp.csproj b/samples/DemoApp/DemoApp.csproj index b13b6b6..e3bc339 100644 --- a/samples/DemoApp/DemoApp.csproj +++ b/samples/DemoApp/DemoApp.csproj @@ -1,22 +1,21 @@ - - - - net8.0;net8.0-android;net8.0-ios;net8.0-maccatalyst - $(TargetFrameworks);net8.0-windows10.0.19041.0 - - - Exe - DemoApp - true - true - enable + + + + net8.0-android;net8.0-ios;net8.0-maccatalyst + $(TargetFrameworks);net8.0-windows10.0.19041.0 + + + Exe + DemoApp + true + true + enable DemoApp uk.co.burkus.demoapp - 8594242f-7e2e-4a34-b978-231d9a424d1f 1.0 @@ -28,6 +27,7 @@ 10.0.17763.0 10.0.17763.0 6.5 + en-US @@ -54,7 +54,7 @@ Generated --> - + @@ -63,6 +63,7 @@ + diff --git a/src/Burkus.Mvvm.Maui/Burkus.Mvvm.Maui.csproj b/src/Burkus.Mvvm.Maui/Burkus.Mvvm.Maui.csproj index 5a3f195..0ebd7c5 100644 --- a/src/Burkus.Mvvm.Maui/Burkus.Mvvm.Maui.csproj +++ b/src/Burkus.Mvvm.Maui/Burkus.Mvvm.Maui.csproj @@ -1,57 +1,61 @@ - - net8.0 - true - enable - enable + + net8.0 + true + enable + enable - 14.2 - 14.0 - 21.0 - 10.0.17763.0 - 10.0.17763.0 - 6.5 + 14.2 + 14.0 + 21.0 + 10.0.17763.0 + 10.0.17763.0 + 6.5 - - Burkus - Copyright © Burkus Ltd., Ronan Burke - True - https://github.com/BurkusCat/Burkus.Mvvm.Maui - https://github.com/BurkusCat/Burkus.Mvvm.Maui - git - burkus;dotnet-maui;maui;mvvm; - True - true - true - snupkg - Burkus.Mvvm.Maui - Burkus.Mvvm.Maui is a simple MVVM (Model–view–viewmodel) framework for .NET MAUI. It provides: navigation, lifecycle events, parameter passing, native dialog abstractions, and testability. - MIT - True - portable - icon.png - README.md - + + Burkus + Copyright © Burkus Ltd., Ronan Burke + True + https://github.com/BurkusCat/Burkus.Mvvm.Maui + https://github.com/BurkusCat/Burkus.Mvvm.Maui + git + burkus;dotnet-maui;maui;mvvm; + True + true + true + snupkg + Burkus.Mvvm.Maui + Burkus.Mvvm.Maui is a simple MVVM (Model–view–viewmodel) framework for .NET MAUI. It provides: navigation, lifecycle events, parameter passing, native dialog abstractions, and testability. + MIT + True + portable + icon.png + README.md + - - - True - True - Resources.resx - + + + + + + + True + True + Resources.resx + - - ResXFileCodeGenerator - Resources.Designer.cs - - + + ResXFileCodeGenerator + Resources.Designer.cs + + - - - - - + + + + + diff --git a/tests/Burkus.Mvvm.Maui.UnitTests/Burkus.Mvvm.Maui.UnitTests.csproj b/tests/Burkus.Mvvm.Maui.UnitTests/Burkus.Mvvm.Maui.UnitTests.csproj index 519fb16..9cd5035 100644 --- a/tests/Burkus.Mvvm.Maui.UnitTests/Burkus.Mvvm.Maui.UnitTests.csproj +++ b/tests/Burkus.Mvvm.Maui.UnitTests/Burkus.Mvvm.Maui.UnitTests.csproj @@ -1,37 +1,36 @@  - - net8.0 - true - enable - enable + + net8.0 + enable + enable - false - true - + false + true + - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + - + - - - + + + - - - + + + diff --git a/tests/DemoApp.UnitTests/DemoApp.UnitTests.csproj b/tests/DemoApp.UnitTests/DemoApp.UnitTests.csproj index 2da4ba0..32ac1d2 100644 --- a/tests/DemoApp.UnitTests/DemoApp.UnitTests.csproj +++ b/tests/DemoApp.UnitTests/DemoApp.UnitTests.csproj @@ -1,46 +1,47 @@  - - net8.0 - true - enable - enable - - false - true - - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - - - - - Code - %(Filename) - - - - - - MSBuild:UpdateDesignTimeXaml - - + + net8.0 + true + enable + enable + + false + true + + + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + + + + + + + Code + %(Filename) + + + + + + MSBuild:UpdateDesignTimeXaml + + From 805ee26f4f4bce42006734f0574d56e16666528f Mon Sep 17 00:00:00 2001 From: Ronan Burke Date: Tue, 14 Nov 2023 17:43:26 +0000 Subject: [PATCH 3/5] Update packages --- samples/DemoApp/DemoApp.csproj | 4 ++-- .../Burkus.Mvvm.Maui.UnitTests.csproj | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/samples/DemoApp/DemoApp.csproj b/samples/DemoApp/DemoApp.csproj index e3bc339..8115b4c 100644 --- a/samples/DemoApp/DemoApp.csproj +++ b/samples/DemoApp/DemoApp.csproj @@ -64,8 +64,8 @@ - - + + diff --git a/tests/Burkus.Mvvm.Maui.UnitTests/Burkus.Mvvm.Maui.UnitTests.csproj b/tests/Burkus.Mvvm.Maui.UnitTests/Burkus.Mvvm.Maui.UnitTests.csproj index 9cd5035..1b8bdbe 100644 --- a/tests/Burkus.Mvvm.Maui.UnitTests/Burkus.Mvvm.Maui.UnitTests.csproj +++ b/tests/Burkus.Mvvm.Maui.UnitTests/Burkus.Mvvm.Maui.UnitTests.csproj @@ -10,9 +10,9 @@ - + - + runtime; build; native; contentfiles; analyzers; buildtransitive all From fdfea048ecf85754b0092ee337c9a530074a2881 Mon Sep 17 00:00:00 2001 From: Ronan Burke Date: Tue, 14 Nov 2023 17:53:52 +0000 Subject: [PATCH 4/5] Roll back some unit test project fixes It doesn't appear to be fixed in .NET8 --- samples/DemoApp/App.xaml.cs | 5 +++++ samples/DemoApp/DemoApp.csproj | 2 +- .../Burkus.Mvvm.Maui.UnitTests.csproj | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/samples/DemoApp/App.xaml.cs b/samples/DemoApp/App.xaml.cs index 71a1f1f..706d332 100644 --- a/samples/DemoApp/App.xaml.cs +++ b/samples/DemoApp/App.xaml.cs @@ -6,4 +6,9 @@ public App() { InitializeComponent(); } + +#if NET8_0_OR_GREATER && !ANDROID && !MACCATALYST && !IOS && !WINDOWS + // workaround for unit tests in Maui https://github.com/dotnet/maui/issues/3552#issuecomment-1172606125 + public static void Main(string[] args) {} +#endif } \ No newline at end of file diff --git a/samples/DemoApp/DemoApp.csproj b/samples/DemoApp/DemoApp.csproj index 8115b4c..07e8b32 100644 --- a/samples/DemoApp/DemoApp.csproj +++ b/samples/DemoApp/DemoApp.csproj @@ -1,7 +1,7 @@  - net8.0-android;net8.0-ios;net8.0-maccatalyst + net8.0;net8.0-android;net8.0-ios;net8.0-maccatalyst $(TargetFrameworks);net8.0-windows10.0.19041.0 diff --git a/tests/Burkus.Mvvm.Maui.UnitTests/Burkus.Mvvm.Maui.UnitTests.csproj b/tests/Burkus.Mvvm.Maui.UnitTests/Burkus.Mvvm.Maui.UnitTests.csproj index 1b8bdbe..85ecc19 100644 --- a/tests/Burkus.Mvvm.Maui.UnitTests/Burkus.Mvvm.Maui.UnitTests.csproj +++ b/tests/Burkus.Mvvm.Maui.UnitTests/Burkus.Mvvm.Maui.UnitTests.csproj @@ -2,6 +2,7 @@ net8.0 + true enable enable From 6cbf240231ec9812fb81f7cc1834a94eb56777db Mon Sep 17 00:00:00 2001 From: Ronan Burke Date: Tue, 14 Nov 2023 17:58:57 +0000 Subject: [PATCH 5/5] CHANGELOG.md updates --- CHANGELOG.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7923607..8eb1003 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,10 +6,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [0.2.0] - Unreleased +## [0.2.0] - 2023-11-14 ### Added - `Burkus.Mvvm.Maui` now automatically imported globally +- Basic FlyoutPage support +- Advanced navigation method: `.GoBack()` +- Source generators for project setup + - Initial app launch requirements now handled automatically + - Native back button handled on pages (opt a page out by using `DisableBackButtonNavigator`) ### Changed - TargetFramework is now `net8.0` (instead of `net7.0`)