Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Update Nuget Packages #406

Merged
merged 1 commit into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,8 @@ dotnet_diagnostic.SA1210.severity = suggestion
dotnet_diagnostic.CA1308.severity = none
# CS1587: XML comment is not placed on a valid language element
dotnet_diagnostic.CS1587.severity = none
# CA1859: Use concrete types when possible for improved performance
dotnet_diagnostic.CA1859.severity = none

# VSTHRD110: This one is bugged: https://github.com/microsoft/vs-threading/issues/899
dotnet_diagnostic.VSTHRD110.severity = none
Expand Down
3 changes: 2 additions & 1 deletion APP_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@ This repository was generated using the **nventive Mobile Template**.
### Local Development Requirements
All development is expected to be done from Visual Studio in a Windows environment.

- .Net 7
- .NET 8
- Visual Studio 2022 (17.4 and above)
- We recommend validating your components using this [Uno guide](https://platform.uno/docs/articles/get-started-vs-2022.html).
- For mobile development, MAUI workloads are required.
- You can install them using [`uno-check`](https://platform.uno/docs/articles/external/uno.check/doc/using-uno-check.html).
- For local iOS compilation and debugging, you need access to Mac with Xcode 14.2 (more recent versions may work too).
> 💡 You'll need an [Apple provisioning profile](https://developer.apple.com/help/account/manage-profiles/create-a-development-provisioning-profile/) to start your application.

### Pipelines Requirements
The pipelines (for continuous integration, testing, and delivery) of this project are made for [Azure Pipelines](https://learn.microsoft.com/en-us/azure/devops/pipelines/get-started/what-is-azure-pipelines?view=azure-devops).
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.5.X
- Bump Uno packages to 5.2.121 to fix a crash on iOS.

## 3.4.X
- Added a kill switch feature to the app.
- Bump Uno.WinUI, Uno.WinUI.DevServer, Uno.WinUI.Lottie and Uno.UI.Adapter.Microsoft.Extensions.Logging to 5.0.159 to fix backNavigation/CloseModal crash.
Expand Down
4 changes: 2 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="7.0.4">
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<!-- Microsoft.VisualStudio.Threading.Analyzers has the async void analyzers. -->
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.5.22" PrivateAssets="all" />
<PackageReference Include="GooseAnalyzers" Version="0.2.0" PrivateAssets="all" />
<PackageReference Include="GooseAnalyzers" Version="1.0.0" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Uno Platform Application Template
# Uno Platform Application Template

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg?style=flat-square)](LICENSE) ![Version](https://img.shields.io/nuget/v/NV.Templates.Mobile?style=flat-square) ![Downloads](https://img.shields.io/nuget/dt/NV.Templates.Mobile?style=flat-square)

Expand All @@ -21,7 +21,7 @@ From left to right: WinUI, iOS, and Android.

## Requirements

Visual Studio 2022 with .Net 7 are required.
Visual Studio 2022 with .NET 8 are required.

This template largely relies on Uno Platform, if you want to make sure you got everything installed correctly on your machine, we encourage you to use `uno-check`, the documentation is available [here](https://platform.uno/docs/articles/uno-check.html)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;

namespace ApplicationTemplate.DataAccess;

public class AuthenticationRepositoryMock : IAuthenticationRepository
public sealed class AuthenticationRepositoryMock : IAuthenticationRepository
{
private readonly JsonSerializerOptions _serializerOptions;

Expand Down Expand Up @@ -43,10 +41,7 @@ public async Task<AuthenticationData> Login(CancellationToken ct, string email,

public async Task<AuthenticationData> RefreshToken(CancellationToken ct, AuthenticationData unauthorizedToken)
{
if (unauthorizedToken is null)
{
throw new ArgumentNullException(nameof(unauthorizedToken));
}
ArgumentNullException.ThrowIfNull(unauthorizedToken);

// We add a delay to simulate a long API call
await Task.Delay(TimeSpan.FromSeconds(2));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<PackageReference Include="Refit" Version="7.0.0" />
<PackageReference Include="ReviewService.Abstractions" Version="1.0.0" />
<PackageReference Include="System.Text.Json" Version="7.0.3" />
<PackageReference Include="MallardMessageHandlers" Version="0.2.0-dev.21" />
<PackageReference Include="MallardMessageHandlers" Version="1.2.0" />
<PackageReference Include="Nventive.Persistence.Reactive" Version="0.5.0" />
<PackageReference Include="Nventive.Persistence" Version="0.5.0" />
<PackageReference Include="System.Reactive" Version="5.0.0" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Text;
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
using MallardMessageHandlers;

namespace ApplicationTemplate;

public class JsonSerializerToResponseContentSererializerAdapter : IResponseContentDeserializer
public sealed class JsonSerializerToResponseContentSererializerAdapter : IResponseContentDeserializer
{
private readonly JsonSerializerOptions _serializerOptions;

Expand All @@ -20,10 +18,7 @@ public JsonSerializerToResponseContentSererializerAdapter(JsonSerializerOptions

public async Task<TResponse> Deserialize<TResponse>(CancellationToken ct, HttpContent content)
{
if (content is null)
{
throw new ArgumentNullException(nameof(content));
}
ArgumentNullException.ThrowIfNull(content);

using (var stream = await content.ReadAsStreamAsync())
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public JwtData(string token, JsonSerializerOptions jsonSerializerOptions = null)
_jsonSerializerOptions = jsonSerializerOptions;
Token = token;

var parts = token?.Split(new[] { '.' });
var parts = token?.Split(['.']);
RawHeader = parts?.Length > 0 ? Base64DecodeToString(parts[0]) : null;
RawPayload = parts?.Length > 1 ? Base64DecodeToString(parts[1]) : null;
Signature = parts?.Length > 2 ? Base64Decode(parts[2]) : null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ public DadJokesQuote(DadJokeContentData data, bool isFavorite)
return;
}

if (data is null)
{
throw new ArgumentNullException(nameof(data));
}
ArgumentNullException.ThrowIfNull(data);

Id = data.Id;
Selftext = data.Selftext;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,7 @@ public async Task<IObservableList<DadJokesQuote>> GetFavorites(CancellationToken

public async Task SetIsFavorite(CancellationToken ct, DadJokesQuote quote, bool isFavorite)
{
if (quote is null)
{
throw new ArgumentNullException(nameof(quote));
}
ArgumentNullException.ThrowIfNull(quote);

var settings = await _applicationSettingsRepository.GetCurrent(ct);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ public KillSwitchService(IKillSwitchRepository killSwitchRepository, ILogger<Kil

/// <inheritdoc/>
public IObservable<bool> ObserveKillSwitchActivation() => _killSwitchRepository.ObserveKillSwitchActivation()
.Do(isActive => _logger.LogInformation("Kill switch is now {isActive}.", isActive));
.Do(isActive => _logger.LogInformation("Kill switch is now {IsActive}.", isActive));
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<LangVersion>12.0</LangVersion>
<TargetFrameworks>net8.0-android;net8.0-ios</TargetFrameworks>
Expand All @@ -18,8 +18,8 @@
<ItemGroup>
<PackageReference Include="Chinook.BackButtonManager.Uno.WinUI" Version="2.1.0" />
<PackageReference Include="Chinook.DataLoader.Uno.WinUI" Version="2.0.0" />
<PackageReference Include="Chinook.DynamicMvvm.Uno.WinUI" Version="2.0.0" />
<PackageReference Include="Chinook.SectionsNavigation.Uno.WinUI" Version="3.0.0" />
<PackageReference Include="Chinook.DynamicMvvm.Uno.WinUI" Version="2.1.0" />
<PackageReference Include="Chinook.SectionsNavigation.Uno.WinUI" Version="3.0.2" />
<PackageReference Include="ExtendedSplashScreen.Uno.WinUI" Version="2.0.0" />
<PackageReference Include="MessageDialogService.Uno.WinUI" Version="2.0.0" />
<PackageReference Include="Microsoft.Maui.Essentials" Version="8.0.3" />
Expand All @@ -28,14 +28,14 @@
<PackageReference Include="Reactive.Annex.Uno.WinUI" Version="2.0.0" />
<PackageReference Include="ReviewService.NativePrompters" Version="1.0.0" />
<PackageReference Include="Uno.CommunityToolkit.WinUI" Version="7.1.200" />
<PackageReference Include="Uno.Material.WinUI" Version="4.0.6" />
<PackageReference Include="Uno.Material.WinUI" Version="5.0.13" />
<PackageReference Include="Uno.Microsoft.Xaml.Behaviors.Interactivity.WinUI" Version="2.4.2" />
<PackageReference Include="Uno.Microsoft.Xaml.Behaviors.WinUI.Managed" Version="2.4.2" />
<PackageReference Include="Uno.Toolkit.WinUI.Material" Version="5.0.17" />
<PackageReference Include="Uno.WinUI" Version="5.0.159" />
<PackageReference Include="Uno.WinUI.DevServer" Version="5.0.159" Condition="'$(Configuration)'=='Debug'" />
<PackageReference Include="Uno.WinUI.Lottie" Version="5.0.159" />
<PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="5.0.159" />
<PackageReference Include="Uno.Toolkit.WinUI.Material" Version="6.0.18" />
<PackageReference Include="Uno.WinUI" Version="5.2.121" />
<PackageReference Include="Uno.WinUI.DevServer" Version="5.2.121" Condition="'$(Configuration)'=='Debug'" />
<PackageReference Include="Uno.WinUI.Lottie" Version="5.2.121" />
<PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="5.2.121" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" />
<PackageReference Include="Serilog.Sinks.Xamarin" Version="1.0.0" />
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
Expand Down Expand Up @@ -100,7 +100,7 @@
<ItemGroup>
<PackageReference Include="Uno.UniversalImageLoader" Version="1.9.36" />
<PackageReference Include="Mono.AotProfiler.Android" Version="7.0.0" />
<PackageReference Include="Xamarin.Kotlin.StdLib.Jdk8" Version="1.9.0.1" />
<PackageReference Include="Xamarin.Kotlin.StdLib.Jdk8" Version="1.9.23.1" />
</ItemGroup>
<ItemGroup>
<AndroidAotProfile Include="custom.aprof" />
Expand Down Expand Up @@ -156,6 +156,7 @@
<Choose>
<When Condition="'$(Configuration)'=='Debug'">
<PropertyGroup>
<ProvisioningType>manual</ProvisioningType>
carlh98 marked this conversation as resolved.
Show resolved Hide resolved
<MtouchDebug>True</MtouchDebug>
<MtouchExtraArgs>$(MtouchExtraArgs) --setenv=MONO_LOG_LEVEL=debug --setenv=MONO_LOG_MASK=gc</MtouchExtraArgs>
<Optimize>False</Optimize>
Expand Down Expand Up @@ -199,7 +200,7 @@
</When>
</Choose>
<ItemGroup>
<PackageReference Include="Uno.Extensions.Logging.OSLog" Version="1.4.0" />
<PackageReference Include="Uno.Extensions.Logging.OSLog" Version="1.7.0" />
</ItemGroup>
<ItemGroup>
<TrimmerRootDescriptor Include="iOS\LinkerExclusions.xml" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<assembly fullname="Microsoft.Extensions.Options" />
<assembly fullname="Microsoft.Extensions.Http" />

<assembly fullname="ApplicationTemplate.DataAccess" />
<assembly fullname="ApplicationTemplate.Access" />
<assembly fullname="ApplicationTemplate.Business" />
<assembly fullname="ApplicationTemplate.Presentation" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="ByteSize" Version="2.1.1" />
<PackageReference Include="ByteSize" Version="2.1.2" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Localization.Abstractions" Version="6.0.2" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" />
Expand All @@ -26,15 +26,15 @@
<PackageReference Include="Serilog.Settings.Configuration" Version="3.4.0" />
<PackageReference Include="Serilog.Sinks.Debug" Version="1.0.1" />
<PackageReference Include="FluentValidation.DependencyInjectionExtensions" Version="9.5.4" />
<PackageReference Include="Chinook.DynamicMvvm" Version="2.0.0" />
<PackageReference Include="Chinook.DynamicMvvm.Reactive" Version="2.0.0" />
<PackageReference Include="Chinook.DynamicMvvm.FluentValidation" Version="2.0.0" />
<PackageReference Include="Chinook.DynamicMvvm.CollectionTracking" Version="2.0.0" />
<PackageReference Include="Chinook.DynamicMvvm" Version="2.1.0" />
<PackageReference Include="Chinook.DynamicMvvm.Reactive" Version="2.1.0" />
<PackageReference Include="Chinook.DynamicMvvm.FluentValidation" Version="2.1.0" />
<PackageReference Include="Chinook.DynamicMvvm.CollectionTracking" Version="2.1.0" />
<PackageReference Include="Chinook.DataLoader" Version="2.0.0" />
<PackageReference Include="Chinook.DataLoader.DynamicMvvm" Version="2.0.0" />
<PackageReference Include="Chinook.BackButtonManager" Version="2.1.0" />
<PackageReference Include="Chinook.SectionsNavigation" Version="3.0.0" />
<PackageReference Include="Chinook.SectionsNavigation.Reactive" Version="3.0.0" />
<PackageReference Include="Chinook.SectionsNavigation" Version="3.0.2" />
<PackageReference Include="Chinook.SectionsNavigation.Reactive" Version="3.0.2" />
<PackageReference Include="MessageDialogService" Version="2.0.0" />
<PackageReference Include="Uno.Injectable" Version="2.0.0-dev.10" />
<PackageReference Include="Uno.CodeGen" Version="2.0.0-dev.10" />
Expand All @@ -43,5 +43,4 @@
<ItemGroup>
<ProjectReference Include="..\ApplicationTemplate.Business\ApplicationTemplate.Business.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,7 @@ public static class ConfigurationConfiguration
/// <param name="environmentManager">The environment manager.</param>
public static IHostBuilder AddConfiguration(this IHostBuilder hostBuilder, string folderPath, IEnvironmentManager environmentManager)
{
if (hostBuilder is null)
{
throw new ArgumentNullException(nameof(hostBuilder));
}
ArgumentNullException.ThrowIfNull(hostBuilder);

return hostBuilder
.AddConfiguration(environmentManager)
Expand Down Expand Up @@ -124,10 +121,7 @@ private static IConfigurationBuilder AddUserOverrideConfiguration(this IConfigur
/// <param name="environmentManager">The environment manager.</param>
private static IHostBuilder AddConfiguration(this IHostBuilder hostBuilder, IEnvironmentManager environmentManager)
{
if (hostBuilder is null)
{
throw new ArgumentNullException(nameof(hostBuilder));
}
ArgumentNullException.ThrowIfNull(hostBuilder);

return hostBuilder.ConfigureServices((hostBuilderContext, serviceCollection) => serviceCollection
.AddSingleton(serviceProvider => hostBuilderContext.Configuration)
Expand All @@ -136,7 +130,7 @@ private static IHostBuilder AddConfiguration(this IHostBuilder hostBuilder, IEnv
);
}

public class AppSettingsFile
public sealed class AppSettingsFile
{
private static AppSettingsFile[] _appSettingsFiles;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using static ApplicationTemplate.ConfigurationConfiguration;

namespace ApplicationTemplate;

/// <summary>
/// This implementation of <see cref="IEnvironmentManager"/> uses local files to support the override features.
/// </summary>
public class EnvironmentManager : IEnvironmentManager
public sealed class EnvironmentManager : IEnvironmentManager
{
//-:cnd:noEmit
#if PRODUCTION
Expand Down Expand Up @@ -58,10 +56,7 @@ public void ClearOverride()

public void Override(string environment)
{
if (environment == null)
{
throw new ArgumentNullException(nameof(environment));
}
ArgumentNullException.ThrowIfNull(environment);

environment = environment.ToUpperInvariant();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace DynamicData;

public static class ChangeSetExtensions
{
public static IEnumerable<T> GetAddedItems<T>(this IChangeSet<T> changeSet)
{
if (changeSet is null)
{
throw new ArgumentNullException(nameof(changeSet));
}
ArgumentNullException.ThrowIfNull(changeSet);

foreach (var change in changeSet)
{
Expand All @@ -38,10 +34,7 @@ public static IEnumerable<T> GetAddedItems<T>(this IChangeSet<T> changeSet)

public static IEnumerable<T> GetRemovedItems<T>(this IChangeSet<T> changeSet)
{
if (changeSet is null)
{
throw new ArgumentNullException(nameof(changeSet));
}
ArgumentNullException.ThrowIfNull(changeSet);

foreach (var change in changeSet)
{
Expand Down
Loading