Skip to content

Commit

Permalink
Merge pull request #37 from BurkusCat/net8-support
Browse files Browse the repository at this point in the history
.NET 8 support
  • Loading branch information
BurkusCat authored Nov 14, 2023
2 parents 96a8493 + 6cbf240 commit 087efde
Show file tree
Hide file tree
Showing 10 changed files with 141 additions and 129 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-demo-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`)
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion samples/DemoApp/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 8 additions & 7 deletions samples/DemoApp/DemoApp.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net7.0;net7.0-android;net7.0-ios;net7.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net7.0-windows10.0.19041.0</TargetFrameworks>
<TargetFrameworks>net8.0;net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
<!-- <TargetFrameworks>$(TargetFrameworks);net7.0-tizen</TargetFrameworks> -->
<!-- <TargetFrameworks>$(TargetFrameworks);net8.0-tizen</TargetFrameworks> -->
<OutputType>Exe</OutputType>
<RootNamespace>DemoApp</RootNamespace>
<UseMaui>true</UseMaui>
Expand All @@ -16,7 +16,6 @@

<!-- App Identifier -->
<ApplicationId>uk.co.burkus.demoapp</ApplicationId>
<ApplicationIdGuid>8594242f-7e2e-4a34-b978-231d9a424d1f</ApplicationIdGuid>

<!-- Versions -->
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
Expand All @@ -28,6 +27,7 @@
<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>
<DefaultLanguage>en-US</DefaultLanguage>
</PropertyGroup>

<ItemGroup>
Expand All @@ -54,7 +54,7 @@
<CompilerGeneratedFilesOutputPath>Generated</CompilerGeneratedFilesOutputPath>
</PropertyGroup>
-->

<ItemGroup>
<None Remove="Resources\Images\contacts.png" />
<None Remove="Resources\Images\reminders.png" />
Expand All @@ -63,8 +63,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="7.0.0" />
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.2" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
98 changes: 51 additions & 47 deletions src/Burkus.Mvvm.Maui/Burkus.Mvvm.Maui.csproj
Original file line number Diff line number Diff line change
@@ -1,57 +1,61 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<UseMaui>true</UseMaui>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<UseMaui>true</UseMaui>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

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

<!-- NuGet -->
<Authors>Burkus</Authors>
<Copyright>Copyright © Burkus Ltd., Ronan Burke</Copyright>
<IsPackable>True</IsPackable>
<PackageProjectUrl>https://github.com/BurkusCat/Burkus.Mvvm.Maui</PackageProjectUrl>
<RepositoryUrl>https://github.com/BurkusCat/Burkus.Mvvm.Maui</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>burkus;dotnet-maui;maui;mvvm;</PackageTags>
<IncludeSymbols>True</IncludeSymbols>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<Title>Burkus.Mvvm.Maui</Title>
<Description>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.</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
<DebugType>portable</DebugType>
<PackageIcon>icon.png</PackageIcon>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>
<!-- NuGet -->
<Authors>Burkus</Authors>
<Copyright>Copyright © Burkus Ltd., Ronan Burke</Copyright>
<IsPackable>True</IsPackable>
<PackageProjectUrl>https://github.com/BurkusCat/Burkus.Mvvm.Maui</PackageProjectUrl>
<RepositoryUrl>https://github.com/BurkusCat/Burkus.Mvvm.Maui</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>burkus;dotnet-maui;maui;mvvm;</PackageTags>
<IncludeSymbols>True</IncludeSymbols>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<Title>Burkus.Mvvm.Maui</Title>
<Description>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.</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
<DebugType>portable</DebugType>
<PackageIcon>icon.png</PackageIcon>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<ItemGroup>
<Compile Update="Properties\Resources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<ItemGroup>
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
</ItemGroup>

<ItemGroup>
<Compile Update="Properties\Resources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>

<EmbeddedResource Update="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<EmbeddedResource Update="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>

<!-- Package additions -->
<ItemGroup>
<None Include="..\..\art\MvvmVertical.png" PackagePath="icon.png" Pack="true" />
<None Include="..\..\README.md" PackagePath="README.md" Pack="true" />
<Content Include="buildTransitive\Burkus.Mvvm.Maui.props" PackagePath="buildTransitive\Burkus.Mvvm.Maui.props" Pack="true" />
<!-- Package additions -->
<ItemGroup>
<None Include="..\..\art\MvvmVertical.png" PackagePath="icon.png" Pack="true" />
<None Include="..\..\README.md" PackagePath="README.md" Pack="true" />
<Content Include="buildTransitive\Burkus.Mvvm.Maui.props" PackagePath="buildTransitive\Burkus.Mvvm.Maui.props" Pack="true" />
<None Include="..\Burkus.Mvvm.Maui.SourceGenerators\bin\$(Configuration)\netstandard2.0\Burkus.Mvvm.Maui.SourceGenerators.dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
</ItemGroup>
</Project>
56 changes: 28 additions & 28 deletions tests/Burkus.Mvvm.Maui.UnitTests/Burkus.Mvvm.Maui.UnitTests.csproj
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<UseMaui>true</UseMaui>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<UseMaui>true</UseMaui>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="NSubstitute" Version="5.1.0" />
<PackageReference Include="xunit" Version="2.5.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="6.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="NSubstitute" Version="5.1.0" />
<PackageReference Include="xunit" Version="2.6.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="6.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

<Import Project="..\..\src\Burkus.Mvvm.Maui\buildTransitive\Burkus.Mvvm.Maui.props" />
<Import Project="..\..\src\Burkus.Mvvm.Maui\buildTransitive\Burkus.Mvvm.Maui.props" />

<ItemGroup>
<ProjectReference Include="..\..\src\Burkus.Mvvm.Maui\Burkus.Mvvm.Maui.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Burkus.Mvvm.Maui\Burkus.Mvvm.Maui.csproj" />
</ItemGroup>

<ItemGroup>
<Folder Include="Extensions\" />
</ItemGroup>
<ItemGroup>
<Folder Include="Extensions\" />
</ItemGroup>

</Project>
85 changes: 43 additions & 42 deletions tests/DemoApp.UnitTests/DemoApp.UnitTests.csproj
Original file line number Diff line number Diff line change
@@ -1,46 +1,47 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<UseMaui>true</UseMaui>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="NSubstitute" Version="5.1.0" />
<PackageReference Include="xunit" Version="2.5.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="6.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

<Import Project="..\..\src\Burkus.Mvvm.Maui\buildTransitive\Burkus.Mvvm.Maui.props" />

<ItemGroup>
<ProjectReference Include="..\..\samples\DemoApp\DemoApp.csproj" />
</ItemGroup>

<ItemGroup>
<Compile Update="HomePage.xaml.cs">
<SubType>Code</SubType>
<DependentUpon>%(Filename)</DependentUpon>
</Compile>
</ItemGroup>

<ItemGroup>
<MauiXaml Update="HomePage.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</MauiXaml>
</ItemGroup>
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<UseMaui>true</UseMaui>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="NSubstitute" Version="5.1.0" />
<PackageReference Include="xunit" Version="2.5.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="6.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

<Import Project="..\..\src\Burkus.Mvvm.Maui\buildTransitive\Burkus.Mvvm.Maui.props" />

<ItemGroup>
<ProjectReference Include="..\..\samples\DemoApp\DemoApp.csproj" />
</ItemGroup>

<ItemGroup>
<Compile Update="HomePage.xaml.cs">
<SubType>Code</SubType>
<DependentUpon>%(Filename)</DependentUpon>
</Compile>
</ItemGroup>

<ItemGroup>
<MauiXaml Update="HomePage.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</MauiXaml>
</ItemGroup>

</Project>

0 comments on commit 087efde

Please sign in to comment.