Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
VladislavAntonyuk committed Nov 2, 2023
1 parent 34f0687 commit 7d3800c
Show file tree
Hide file tree
Showing 142 changed files with 1,662 additions and 1,778 deletions.
26 changes: 13 additions & 13 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ updates:
assignees:
- "VladislavAntonyuk"
open-pull-requests-limit: 10
groups:
Microsoft:
patterns:
- "Microsoft*"
Syncfusion:
patterns:
- "Syncfusion*"
CommunityToolkit:
patterns:
- "CommunityToolkit*"
SQLitePCLRaw:
patterns:
- "SQLitePCLRaw*"
groups:
Microsoft:
patterns:
- "Microsoft*"
Syncfusion:
patterns:
- "Syncfusion*"
CommunityToolkit:
patterns:
- "CommunityToolkit*"
SQLitePCLRaw:
patterns:
- "SQLitePCLRaw*"
8 changes: 4 additions & 4 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-13]
os: [windows-latest, macos-latest]

steps:
- name: Prepare variables on Windows
Expand All @@ -26,7 +26,7 @@ jobs:
echo "WORKING_DIRECTORY_PATH=C:/Projects/MauiSamples" >> $env:GITHUB_ENV
- name: Prepare variables on macOS
if: ${{ matrix.os == 'macos-13' }}
if: ${{ matrix.os == 'macos-latest' }}
run: |
echo "WORKING_DIRECTORY_PATH=/Users/runner/Projects/MauiSamples" >> $GITHUB_ENV
Expand All @@ -37,10 +37,10 @@ jobs:
git checkout ${{ github.head_ref || github.ref_name }}
- name: Setup Xcode
if: ${{ matrix.os == 'macos-13' }}
if: ${{ matrix.os == 'macos-latest' }}
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '14.3'
xcode-version: '15.0'

- name: Setup .NET
uses: actions/setup-dotnet@v3
Expand Down
28 changes: 14 additions & 14 deletions task-list-app-maui/App.xaml → Database/MauiTaskListApp/App.xaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?xml version = "1.0" encoding = "UTF-8" ?>
<Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:task_list_app_maui"
x:Class="task_list_app_maui.App">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Resources/Styles/Colors.xaml" />
<ResourceDictionary Source="Resources/Styles/Styles.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>
<?xml version = "1.0" encoding = "UTF-8" ?>
<Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:MauiTaskListApp"
x:Class="MauiTaskListApp.App">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Resources/Styles/Colors.xaml" />
<ResourceDictionary Source="Resources/Styles/Styles.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
namespace task_list_app_maui;

public partial class App : Application
{
public App()
{
InitializeComponent();

MainPage = new AppShell();
}
namespace MauiTaskListApp;

public partial class App : Application
{
public App()
{
InitializeComponent();

MainPage = new AppShell();
}
}
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Shell
x:Class="task_list_app_maui.AppShell"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:views="clr-namespace:task_list_app_maui.Views"
Shell.FlyoutBehavior="Disabled"
Shell.BackgroundColor="DarkGreen"
Title="Task List">

<Shell.ToolbarItems>
<ToolbarItem Text="Search"
IconImageSource="search.png"
Clicked="OnSearchClicked" />
<ToolbarItem Text="About"
Order="Secondary"
Clicked="OnAboutClicked" />
</Shell.ToolbarItems>

<TabBar>
<Tab Title="Pending Tasks"
Icon="task_list.png">
<ShellContent ContentTemplate="{DataTemplate views:TarefasPendentesView}" />
</Tab>
<Tab Title="Completed Tasks"
Icon="task_check.png">
<ShellContent ContentTemplate="{DataTemplate views:TarefasConcluidasView}" />
</Tab>
</TabBar>
</Shell>
<?xml version="1.0" encoding="UTF-8" ?>
<Shell
x:Class="MauiTaskListApp.AppShell"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:views="clr-namespace:MauiTaskListApp.Views"
Shell.FlyoutBehavior="Disabled"
Shell.BackgroundColor="DarkGreen"
Title="Task List">

<Shell.ToolbarItems>
<ToolbarItem Text="Search"
IconImageSource="search.png"
Clicked="OnSearchClicked" />

<ToolbarItem Text="About"
Order="Secondary"
Clicked="OnAboutClicked" />
</Shell.ToolbarItems>

<TabBar>
<Tab Title="Pending Tasks"
Icon="task_list.png">

<ShellContent ContentTemplate="{DataTemplate views:PendingTasksView}" />
</Tab>

<Tab Title="Completed Tasks"
Icon="task_check.png">

<ShellContent ContentTemplate="{DataTemplate views:CompletedTasksView}" />
</Tab>
</TabBar>
</Shell>
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
namespace task_list_app_maui;

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

private void OnSearchClicked(object sender, EventArgs e)
{
DisplayAlert(Title, "Search Tasks", "OK");
}

private void OnAboutClicked(object sender, EventArgs e)
{
DisplayAlert(Title, "Information about the Task List app", "OK");
}
namespace MauiTaskListApp;

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

private void OnSearchClicked(object sender, EventArgs e)
{
DisplayAlert(Title, "Search Tasks", "OK");
}

private void OnAboutClicked(object sender, EventArgs e)
{
DisplayAlert(Title, "Information about the Task List app", "OK");
}
}
9 changes: 9 additions & 0 deletions Database/MauiTaskListApp/Data/AppDbContext.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace MauiTaskListApp.Data;

using Microsoft.EntityFrameworkCore;
using Models;

public class AppDbContext(DbContextOptions<AppDbContext> options) : DbContext(options)
{
public DbSet<Task> Tasks => Set<Task>();
}
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
using CommunityToolkit.Maui;
using Microsoft.EntityFrameworkCore;
using task_list_app_maui.Data;
using task_list_app_maui.ViewModels;
using task_list_app_maui.Views;

namespace task_list_app_maui;

public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.UseMauiCommunityToolkit()
.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
});

builder.Services.AddDbContext<AppDbContext>(options => { options.UseInMemoryDatabase("task-list-app-maui"); });

builder.Services.AddSingleton<TarefasViewModel>();

builder.Services.AddSingleton<TarefasPendentesView>();
builder.Services.AddSingleton<TarefasConcluidasView>();

return builder.Build();
}
namespace MauiTaskListApp;

using CommunityToolkit.Maui;
using Data;
using Microsoft.EntityFrameworkCore;
using ViewModels;
using Views;

public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.UseMauiCommunityToolkit()
.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
});

builder.Services.AddDbContext<AppDbContext>(options => { options.UseInMemoryDatabase("MauiTaskListApp"); });

builder.Services.AddSingleton<TasksViewModel>();

builder.Services.AddSingleton<PendingTasksView>();
builder.Services.AddSingleton<CompletedTasksView>();

return builder.Build();
}
}
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<RootNamespace>task_list_app_maui</RootNamespace>

<!-- Display name -->
<ApplicationTitle>Task List</ApplicationTitle>

<!-- App Identifier -->
<ApplicationId>jfs-dev.task-list-app-maui</ApplicationId>

<!-- Versions -->
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<ApplicationVersion>1</ApplicationVersion>
</PropertyGroup>

<ItemGroup>
<!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\appicon.svg" Color="#006400" />

<!-- Splash Screen -->
<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#006400" BaseSize="128,128" />

<!-- Images -->
<MauiImage Include="Resources\Images\*" />

<!-- Custom Fonts -->
<MauiFont Include="Resources\Fonts\*" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="CommunityToolkit.Maui" Version="5.3.0" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.0-rc.2.23480.1" />
</ItemGroup>

</Project>
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<RootNamespace>MauiTaskListApp</RootNamespace>

<!-- Display name -->
<ApplicationTitle>Task List</ApplicationTitle>

<!-- App Identifier -->
<ApplicationId>jfs-dev.task-list-app-maui</ApplicationId>

<!-- Versions -->
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<ApplicationVersion>1</ApplicationVersion>
</PropertyGroup>

<ItemGroup>
<!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\appicon.svg" Color="#006400" />

<!-- Splash Screen -->
<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#006400" BaseSize="128,128" />

<!-- Images -->
<MauiImage Include="Resources\Images\*" />

<!-- Custom Fonts -->
<MauiFont Include="Resources\Fonts\*" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="CommunityToolkit.Maui" Version="6.0.0" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.0-rc.2.23480.1" />
</ItemGroup>

</Project>
Loading

0 comments on commit 7d3800c

Please sign in to comment.