Skip to content

Commit

Permalink
🚀 [Code] Updated the functionalities to .NET 8 c1
Browse files Browse the repository at this point in the history
  • Loading branch information
danielmonettelli committed Mar 5, 2024
1 parent 3ac0c2f commit 5caa22a
Show file tree
Hide file tree
Showing 60 changed files with 1,388 additions and 899 deletions.
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# These are supported funding model platforms

github: [danielmonettelli]
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "nuget"
directory: "/Mitawi/"
schedule:
interval: "daily"
60 changes: 22 additions & 38 deletions .github/workflows/mobile.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: .NET MAUI CI
name: .NET MAUI - CI

on:
push:
Expand Down Expand Up @@ -29,90 +29,78 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Setup .NET v7.0
uses: actions/setup-dotnet@v3
- name: Setup .NET v8.0
uses: actions/setup-dotnet@v4.0.0
with:
dotnet-version: "7.0.x"
dotnet-version: "8.0.x"

- name: Install .NET MAUI Workload
run: |
dotnet workload install maui
- name: Add NuGet Package Source
run: |
dotnet nuget add source --username danielmonettelli --password ${{ secrets.MY_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/danielmonettelli/index.json"
- name: Restore NuGet
run: |
dotnet restore ./Mitawi
- name: Build Android App
run: |
dotnet build ./Mitawi -f net7.0-android
dotnet build ./Mitawi -f net8.0-android
Build_iOS:
runs-on: macos-12
runs-on: macos-14

steps:
- uses: actions/checkout@v3

- name: Setup .NET v7.0
uses: actions/setup-dotnet@v3
- name: Setup .NET v8.0
uses: actions/setup-dotnet@v4.0.0
with:
dotnet-version: "7.0.x"
dotnet-version: "8.0.x"

- name: Install .NET MAUI Workload
run: |
dotnet workload install maui
- name: Add NuGet Package Source
run: |
dotnet nuget add source --username danielmonettelli --password ${{ secrets.MY_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/danielmonettelli/index.json"
- name: Restore NuGet
run: |
dotnet restore ./Mitawi
- name: Install Xcode
uses: maxim-lobanov/setup-xcode@v1.5.1
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest
xcode-version: latest-stable

- name: Build iOS App
run: |
dotnet build ./Mitawi -f net7.0-ios
dotnet build ./Mitawi -f net8.0-ios
Build_MacCatalyst:
runs-on: macos-12
runs-on: macos-14

steps:
- uses: actions/checkout@v3

- name: Setup .NET v7.0
uses: actions/setup-dotnet@v3
- name: Setup .NET v8.0
uses: actions/setup-dotnet@v4.0.0
with:
dotnet-version: "7.0.x"
dotnet-version: "8.0.x"

- name: Install .NET MAUI Workload
run: |
dotnet workload install maui
- name: Add NuGet Package Source
run: |
dotnet nuget add source --username danielmonettelli --password ${{ secrets.MY_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/danielmonettelli/index.json"
- name: Restore NuGet
run: |
dotnet restore ./Mitawi
- name: Install Xcode
uses: maxim-lobanov/setup-xcode@v1.5.1
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest
xcode-version: latest-stable

- name: Build macOS App
run: |
dotnet build ./Mitawi -f net7.0-maccatalyst
dotnet build ./Mitawi -f net8.0-maccatalyst
Build_Windows:
runs-on: windows-latest
Expand All @@ -125,18 +113,14 @@ jobs:
distribution: 'microsoft'
java-version: '11'

- name: Setup .NET v7.0
uses: actions/setup-dotnet@v3
- name: Setup .NET v8.0
uses: actions/setup-dotnet@v4.0.0
with:
dotnet-version: "7.0.x"
dotnet-version: "8.0.x"

- name: Install .NET MAUI Workload
run: |
dotnet workload install maui
- name: Add NuGet Package Source
run: |
dotnet nuget add source --username danielmonettelli --password ${{ secrets.MY_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/danielmonettelli/index.json"
- name: Restore NuGet
run: |
Expand Down
12 changes: 6 additions & 6 deletions Mitawi/App.xaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<Application
x:Class="Mitawi.App"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">

xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:Mitawi">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Resources/Themes/DefaultTheme.xaml" />
<ResourceDictionary Source="Resources/Styles/Colors.xaml" />
<ResourceDictionary Source="Resources/Styles/Styles.xaml" />
<ResourceDictionary Source="Resources/Styles/Labels.xaml" />
<ResourceDictionary Source="Resources/Styles/Icons.xaml" />
<ResourceDictionary Source="Resources/Styles/Bases.xaml" />
Expand All @@ -16,5 +17,4 @@
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>

</Application>
</Application>
8 changes: 1 addition & 7 deletions Mitawi/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,10 @@

public partial class App : Application
{
public static NavigationService NavigationService { get; } = new NavigationService();
public static IWeatherDataService WeatherDataServie { get; } = new WeatherDataService(new WeatherDataRepository());

public App()
{
InitializeComponent();

NavigationService.Configure(ViewNames.HomePage, typeof(HomePage));
NavigationService.Configure(ViewNames.HomeDetailPage, typeof(HomeDetailPage));

MainPage = new NavigationPage(new HomePage());
MainPage = new AppShell();
}
}
22 changes: 22 additions & 0 deletions Mitawi/AppShell.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Shell
x:Class="Mitawi.AppShell"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:mct="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
xmlns:view="clr-namespace:Mitawi.Views"
Title="Mitawi"
Shell.FlyoutBehavior="Disabled">

<Shell.Behaviors>
<mct:StatusBarBehavior
StatusBarColor="#11b0fd"
StatusBarStyle="Default" />
</Shell.Behaviors>

<ShellContent
Title="Welcome"
ContentTemplate="{DataTemplate view:WelcomePage}"
Route="WelcomePage" />

</Shell>
12 changes: 12 additions & 0 deletions Mitawi/AppShell.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
namespace Mitawi;

public partial class AppShell : Shell
{
public AppShell()
{
InitializeComponent();

Routing.RegisterRoute(nameof(HomePage), typeof(HomePage));
Routing.RegisterRoute(nameof(HomeDetailPage), typeof(HomeDetailPage));
}
}
19 changes: 9 additions & 10 deletions Mitawi/CodeFontIcons/CustomFontIcons.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
namespace Mitawi.CodeFontIcons
namespace Mitawi.CodeFontIcons;

internal static class CustomFontIcons
{
internal static class CustomFontIcons
{
public const string icon_arrow_forward_outline = "\ue800";
public const string icon_calendar_outline = "\ue801";
public const string icon_degree_symbol_outline = "\ue802";
public const string icon_location_solid = "\ue803";
public const string icon_picker_solid = "\ue804";
public const string icon_wind_outline = "\ue805";
}
public const string icon_arrow_forward_outline = "\ue800";
public const string icon_calendar_outline = "\ue801";
public const string icon_degree_symbol_outline = "\ue802";
public const string icon_location_solid = "\ue803";
public const string icon_picker_solid = "\ue804";
public const string icon_wind_outline = "\ue805";
}
27 changes: 13 additions & 14 deletions Mitawi/Converters/CustomImageUrlScalingConverter.cs
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
namespace Mitawi.Converters
namespace Mitawi.Converters;

public class CustomImageUrlScalingConverter : BaseConverter<object, object, object>
{
public class CustomImageUrlScalingConverter : BaseConverter<object, object, object>
{
public override object DefaultConvertReturnValue { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
public override object DefaultConvertBackReturnValue { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
public override object DefaultConvertReturnValue { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
public override object DefaultConvertBackReturnValue { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }

public override object ConvertFrom(object value, object parameter, CultureInfo culture)
{
// Image scale type in the parameter: 2(100x100approx), 4(200x200approx), 10(500x500approx)
return "https://raw.githubusercontent.com/danielmonettelli/MyResources/main/OpenWeather_Icons_Redesign/" + value + "@" + parameter + "x.png";
}
public override object ConvertFrom(object value, object parameter, CultureInfo culture)

Check warning on line 8 in Mitawi/Converters/CustomImageUrlScalingConverter.cs

View workflow job for this annotation

GitHub Actions / Build_iOS

Nullability of type of parameter 'culture' doesn't match overridden member (possibly because of nullability attributes).

Check warning on line 8 in Mitawi/Converters/CustomImageUrlScalingConverter.cs

View workflow job for this annotation

GitHub Actions / Build_Android

Nullability of type of parameter 'culture' doesn't match overridden member (possibly because of nullability attributes).

Check warning on line 8 in Mitawi/Converters/CustomImageUrlScalingConverter.cs

View workflow job for this annotation

GitHub Actions / Build_MacCatalyst

Nullability of type of parameter 'culture' doesn't match overridden member (possibly because of nullability attributes).

Check warning on line 8 in Mitawi/Converters/CustomImageUrlScalingConverter.cs

View workflow job for this annotation

GitHub Actions / Build_Windows

Nullability of type of parameter 'culture' doesn't match overridden member (possibly because of nullability attributes).

Check warning on line 8 in Mitawi/Converters/CustomImageUrlScalingConverter.cs

View workflow job for this annotation

GitHub Actions / Build_Windows

Nullability of type of parameter 'culture' doesn't match overridden member (possibly because of nullability attributes).

Check warning on line 8 in Mitawi/Converters/CustomImageUrlScalingConverter.cs

View workflow job for this annotation

GitHub Actions / Build_Windows

Nullability of type of parameter 'culture' doesn't match overridden member (possibly because of nullability attributes).
{
// Image scale type in the parameter: 2(100x100approx), 4(200x200approx), 10(500x500approx)
return "https://raw.githubusercontent.com/danielmonettelli/MyResources/main/OpenWeather_Icons_Redesign/" + value + "@" + parameter + "x.png";
}

public override object ConvertBackTo(object value, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
public override object ConvertBackTo(object value, object parameter, CultureInfo culture)

Check warning on line 14 in Mitawi/Converters/CustomImageUrlScalingConverter.cs

View workflow job for this annotation

GitHub Actions / Build_iOS

Nullability of type of parameter 'culture' doesn't match overridden member (possibly because of nullability attributes).

Check warning on line 14 in Mitawi/Converters/CustomImageUrlScalingConverter.cs

View workflow job for this annotation

GitHub Actions / Build_Android

Nullability of type of parameter 'culture' doesn't match overridden member (possibly because of nullability attributes).

Check warning on line 14 in Mitawi/Converters/CustomImageUrlScalingConverter.cs

View workflow job for this annotation

GitHub Actions / Build_MacCatalyst

Nullability of type of parameter 'culture' doesn't match overridden member (possibly because of nullability attributes).

Check warning on line 14 in Mitawi/Converters/CustomImageUrlScalingConverter.cs

View workflow job for this annotation

GitHub Actions / Build_Windows

Nullability of type of parameter 'culture' doesn't match overridden member (possibly because of nullability attributes).

Check warning on line 14 in Mitawi/Converters/CustomImageUrlScalingConverter.cs

View workflow job for this annotation

GitHub Actions / Build_Windows

Nullability of type of parameter 'culture' doesn't match overridden member (possibly because of nullability attributes).

Check warning on line 14 in Mitawi/Converters/CustomImageUrlScalingConverter.cs

View workflow job for this annotation

GitHub Actions / Build_Windows

Nullability of type of parameter 'culture' doesn't match overridden member (possibly because of nullability attributes).
{
throw new NotImplementedException();
}
}
27 changes: 13 additions & 14 deletions Mitawi/Converters/NegativeAndPositiveNumberConverter.cs
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
namespace Mitawi.Converters
namespace Mitawi.Converters;

public class NegativeAndPositiveNumberConverter : BaseConverter<object, object>
{
public class NegativeAndPositiveNumberConverter : BaseConverter<object, object>
{
public override object DefaultConvertReturnValue { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
public override object DefaultConvertBackReturnValue { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
public override object DefaultConvertReturnValue { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
public override object DefaultConvertBackReturnValue { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }

public override object ConvertFrom(object value, CultureInfo culture)
{
int number = (int)value;
public override object ConvertFrom(object value, CultureInfo culture)

Check warning on line 8 in Mitawi/Converters/NegativeAndPositiveNumberConverter.cs

View workflow job for this annotation

GitHub Actions / Build_iOS

Nullability of type of parameter 'culture' doesn't match overridden member (possibly because of nullability attributes).

Check warning on line 8 in Mitawi/Converters/NegativeAndPositiveNumberConverter.cs

View workflow job for this annotation

GitHub Actions / Build_Android

Nullability of type of parameter 'culture' doesn't match overridden member (possibly because of nullability attributes).

Check warning on line 8 in Mitawi/Converters/NegativeAndPositiveNumberConverter.cs

View workflow job for this annotation

GitHub Actions / Build_MacCatalyst

Nullability of type of parameter 'culture' doesn't match overridden member (possibly because of nullability attributes).

Check warning on line 8 in Mitawi/Converters/NegativeAndPositiveNumberConverter.cs

View workflow job for this annotation

GitHub Actions / Build_Windows

Nullability of type of parameter 'culture' doesn't match overridden member (possibly because of nullability attributes).

Check warning on line 8 in Mitawi/Converters/NegativeAndPositiveNumberConverter.cs

View workflow job for this annotation

GitHub Actions / Build_Windows

Nullability of type of parameter 'culture' doesn't match overridden member (possibly because of nullability attributes).

Check warning on line 8 in Mitawi/Converters/NegativeAndPositiveNumberConverter.cs

View workflow job for this annotation

GitHub Actions / Build_Windows

Nullability of type of parameter 'culture' doesn't match overridden member (possibly because of nullability attributes).
{
int number = (int)value;

return number < 0 ? number : "+" + number;
}
return number < 0 ? number : "+" + number;
}

public override object ConvertBackTo(object value, CultureInfo culture)
{
throw new NotImplementedException();
}
public override object ConvertBackTo(object value, CultureInfo culture)

Check warning on line 15 in Mitawi/Converters/NegativeAndPositiveNumberConverter.cs

View workflow job for this annotation

GitHub Actions / Build_iOS

Nullability of type of parameter 'culture' doesn't match overridden member (possibly because of nullability attributes).

Check warning on line 15 in Mitawi/Converters/NegativeAndPositiveNumberConverter.cs

View workflow job for this annotation

GitHub Actions / Build_Android

Nullability of type of parameter 'culture' doesn't match overridden member (possibly because of nullability attributes).

Check warning on line 15 in Mitawi/Converters/NegativeAndPositiveNumberConverter.cs

View workflow job for this annotation

GitHub Actions / Build_MacCatalyst

Nullability of type of parameter 'culture' doesn't match overridden member (possibly because of nullability attributes).

Check warning on line 15 in Mitawi/Converters/NegativeAndPositiveNumberConverter.cs

View workflow job for this annotation

GitHub Actions / Build_Windows

Nullability of type of parameter 'culture' doesn't match overridden member (possibly because of nullability attributes).
{
throw new NotImplementedException();
}
}
27 changes: 13 additions & 14 deletions Mitawi/Converters/OpenWeatherImageUrlScalingConverter.cs
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
namespace Mitawi.Converters
namespace Mitawi.Converters;

public class OpenWeatherImageUrlScalingConverter : BaseConverter<object, object, object>
{
public class OpenWeatherImageUrlScalingConverter : BaseConverter<object, object, object>
{
public override object DefaultConvertReturnValue { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
public override object DefaultConvertBackReturnValue { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
public override object DefaultConvertReturnValue { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
public override object DefaultConvertBackReturnValue { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }

public override object ConvertFrom(object value, object parameter, CultureInfo culture)
{
// Image scale type in the parameter: 2(100x100), 4(200x200)
return "http://openweathermap.org/img/wn/" + value + "@" + parameter + "x.png";
}
public override object ConvertFrom(object value, object parameter, CultureInfo culture)

Check warning on line 8 in Mitawi/Converters/OpenWeatherImageUrlScalingConverter.cs

View workflow job for this annotation

GitHub Actions / Build_iOS

Nullability of type of parameter 'culture' doesn't match overridden member (possibly because of nullability attributes).

Check warning on line 8 in Mitawi/Converters/OpenWeatherImageUrlScalingConverter.cs

View workflow job for this annotation

GitHub Actions / Build_Android

Nullability of type of parameter 'culture' doesn't match overridden member (possibly because of nullability attributes).

Check warning on line 8 in Mitawi/Converters/OpenWeatherImageUrlScalingConverter.cs

View workflow job for this annotation

GitHub Actions / Build_MacCatalyst

Nullability of type of parameter 'culture' doesn't match overridden member (possibly because of nullability attributes).
{
// Image scale type in the parameter: 2(100x100), 4(200x200)
return "http://openweathermap.org/img/wn/" + value + "@" + parameter + "x.png";
}

public override object ConvertBackTo(object value, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
public override object ConvertBackTo(object value, object parameter, CultureInfo culture)

Check warning on line 14 in Mitawi/Converters/OpenWeatherImageUrlScalingConverter.cs

View workflow job for this annotation

GitHub Actions / Build_iOS

Nullability of type of parameter 'culture' doesn't match overridden member (possibly because of nullability attributes).

Check warning on line 14 in Mitawi/Converters/OpenWeatherImageUrlScalingConverter.cs

View workflow job for this annotation

GitHub Actions / Build_Android

Nullability of type of parameter 'culture' doesn't match overridden member (possibly because of nullability attributes).

Check warning on line 14 in Mitawi/Converters/OpenWeatherImageUrlScalingConverter.cs

View workflow job for this annotation

GitHub Actions / Build_MacCatalyst

Nullability of type of parameter 'culture' doesn't match overridden member (possibly because of nullability attributes).
{
throw new NotImplementedException();
}
}
25 changes: 12 additions & 13 deletions Mitawi/Converters/StringToFirstCharactersConverter.cs
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
namespace Mitawi.Converters
namespace Mitawi.Converters;

public class StringToFirstCharactersConverter : BaseConverter<object, object, object>
{
public class StringToFirstCharactersConverter : BaseConverter<object, object, object>
{
public override object DefaultConvertReturnValue { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
public override object DefaultConvertBackReturnValue { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
public override object DefaultConvertReturnValue { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
public override object DefaultConvertBackReturnValue { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }

public override object ConvertFrom(object value, object parameter, CultureInfo culture)
{
return value.ToString().Substring(0, Convert.ToInt32(parameter));
}
public override object ConvertFrom(object value, object parameter, CultureInfo culture)

Check warning on line 8 in Mitawi/Converters/StringToFirstCharactersConverter.cs

View workflow job for this annotation

GitHub Actions / Build_iOS

Nullability of type of parameter 'culture' doesn't match overridden member (possibly because of nullability attributes).

Check warning on line 8 in Mitawi/Converters/StringToFirstCharactersConverter.cs

View workflow job for this annotation

GitHub Actions / Build_Android

Nullability of type of parameter 'culture' doesn't match overridden member (possibly because of nullability attributes).

Check warning on line 8 in Mitawi/Converters/StringToFirstCharactersConverter.cs

View workflow job for this annotation

GitHub Actions / Build_MacCatalyst

Nullability of type of parameter 'culture' doesn't match overridden member (possibly because of nullability attributes).
{
return value.ToString().Substring(0, Convert.ToInt32(parameter));
}

public override object ConvertBackTo(object value, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
public override object ConvertBackTo(object value, object parameter, CultureInfo culture)

Check warning on line 13 in Mitawi/Converters/StringToFirstCharactersConverter.cs

View workflow job for this annotation

GitHub Actions / Build_iOS

Nullability of type of parameter 'culture' doesn't match overridden member (possibly because of nullability attributes).

Check warning on line 13 in Mitawi/Converters/StringToFirstCharactersConverter.cs

View workflow job for this annotation

GitHub Actions / Build_Android

Nullability of type of parameter 'culture' doesn't match overridden member (possibly because of nullability attributes).

Check warning on line 13 in Mitawi/Converters/StringToFirstCharactersConverter.cs

View workflow job for this annotation

GitHub Actions / Build_MacCatalyst

Nullability of type of parameter 'culture' doesn't match overridden member (possibly because of nullability attributes).
{
throw new NotImplementedException();
}
}
Loading

0 comments on commit 5caa22a

Please sign in to comment.