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

Maui 6.0.300 rc.2 #179

Merged
merged 36 commits into from
Apr 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
fb6bb0f
up
Thuyen21 Apr 13, 2022
52ebe7d
up
Thuyen21 Apr 13, 2022
3d35032
Update BlazorMovie.Maui.csproj
Thuyen21 Apr 13, 2022
cbef314
up
Thuyen21 Apr 13, 2022
41d0440
Merge branch 'main' into up-6.0.300-rc.1
Thuyen21 Apr 13, 2022
753cf98
Merge branch 'main' into up-6.0.300-rc.1
Thuyen21 Apr 13, 2022
e062477
Merge branch 'main' into up-6.0.300-rc.1
Thuyen21 Apr 13, 2022
86019c0
up
Thuyen21 Apr 13, 2022
f5c4473
Update dotnet.yml
Thuyen21 Apr 13, 2022
a5ac3ff
Update dotnet.yml
Thuyen21 Apr 13, 2022
e741eb0
Merge branch 'main' into up-6.0.300-rc.1
Thuyen21 Apr 13, 2022
00ec9ff
Update dotnet.yml
Thuyen21 Apr 13, 2022
73461ad
Update dotnet.yml
Thuyen21 Apr 13, 2022
eea4e17
Merge branch 'main' into up-6.0.300-rc.1
Thuyen21 Apr 13, 2022
687cd3c
up
Thuyen21 Apr 25, 2022
8664b4a
Merge branch 'main' into up-6.0.300-rc.1
Thuyen21 Apr 25, 2022
180e420
Update dotnet.yml
Thuyen21 Apr 25, 2022
676af9f
Update dotnet.yml
Thuyen21 Apr 25, 2022
20b2708
Update dotnet.yml
Thuyen21 Apr 25, 2022
b2c32f9
up
Thuyen21 Apr 25, 2022
cf2717b
Update dotnet.yml
Thuyen21 Apr 25, 2022
b9e5d6c
Update dotnet.yml
Thuyen21 Apr 27, 2022
07e95e0
Update dotnet.yml
Thuyen21 Apr 27, 2022
b0028a5
Update dotnet.yml
Thuyen21 Apr 27, 2022
99270dc
Update dotnet.yml
Thuyen21 Apr 27, 2022
9b24293
up
Thuyen21 Apr 27, 2022
59621ff
Update global.json
Thuyen21 Apr 27, 2022
cfaf330
Revert "Update global.json"
Thuyen21 Apr 27, 2022
88d59d8
Update global.json
Thuyen21 Apr 27, 2022
f674819
up
Thuyen21 Apr 27, 2022
90a45b4
Update global.json
Thuyen21 Apr 27, 2022
43cebf7
Update global.json
Thuyen21 Apr 27, 2022
6407eff
Update README.md
Thuyen21 Apr 27, 2022
27ede3b
up
Thuyen21 Apr 27, 2022
c0168a2
Merge branch 'up-6.0.300-rc.1' of https://github.com/Thuyen21/Blazor-…
Thuyen21 Apr 27, 2022
8aa7e7b
up
Thuyen21 Apr 27, 2022
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
12 changes: 6 additions & 6 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,20 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: "6.0.x"
include-prerelease: true

- uses: actions/setup-java@v3.1.1
with:
distribution: "adopt"
java-version: "11"
distribution: 'adopt'
java-version: '11'
check-latest: true

- name: Install tools
run: |
dotnet workload restore
# dotnet workload install android ios maccatalyst tvos macos maui wasm-tools

dotnet workload install maui wasm-tools
# dotnet workload restore
# dotnet workload install android ios maccatalyst tvos macos maui wasm-tools

- name: Restore dependencies
run: dotnet restore
# - name: Build
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,21 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: "6.0.x"
include-prerelease: true

- uses: actions/setup-java@v3.1.1
with:
distribution: "adopt"
java-version: "11"
distribution: 'adopt'
java-version: '11'
check-latest: true

- name: Install format
run: dotnet tool install -g dotnet-format --version "7.*" --add-source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7/nuget/v3/index.json

- name: Install tools
run: |
dotnet workload restore
dotnet workload install maui wasm-tools
# dotnet workload restore

- name: Dotnet Restore
run: dotnet restore
Expand All @@ -61,6 +61,6 @@ jobs:
committer: GitHub <noreply@github.com>
author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
labels: t/housekeeping ♻︎
assignees: Thuyen21
assignees: github-actions[bot]
reviewers: Thuyen21
branch: housekeeping/fix-codeformatting
13 changes: 6 additions & 7 deletions .github/workflows/heroku.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,29 +20,28 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: "6.0.x"
include-prerelease: true

- uses: actions/setup-java@v3.1.1
with:
distribution: "adopt"
java-version: "11"
distribution: 'adopt'
java-version: '11'
check-latest: true

- name: Install tools
run: |
dotnet workload install wasm-tools

- name: Publish
working-directory: "./BlazorMovie/Server/"
working-directory: './BlazorMovie/Server/'
run: dotnet publish BlazorMovie.Server.csproj
- name: copy file
uses: canastro/copy-file-action@master
with:
source: "Dockerfile"
target: "BlazorMovie/Server/bin/Debug/net6.0/publish/Dockerfile"
source: 'Dockerfile'
target: 'BlazorMovie/Server/bin/Debug/net6.0/publish/Dockerfile'
- name: Deploy
working-directory: "./BlazorMovie/Server/bin/Debug/net6.0/publish/"
working-directory: './BlazorMovie/Server/bin/Debug/net6.0/publish/'
run: |
heroku container:login
heroku container:push web -a movie213
Expand Down
60 changes: 30 additions & 30 deletions BlazorMovie/Client/BlazorMovie.Client.csproj
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<TypeScriptTarget>ESNext</TypeScriptTarget>
</PropertyGroup>
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<TypeScriptTarget>ESNext</TypeScriptTarget>
</PropertyGroup>

<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<TypeScriptTarget>ESNext</TypeScriptTarget>
</PropertyGroup>
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<TypeScriptTarget>ESNext</TypeScriptTarget>
</PropertyGroup>

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<ServiceWorkerAssetsManifest>service-worker-assets.js</ServiceWorkerAssetsManifest>
<RunAOTCompilation>true</RunAOTCompilation>
<ImplicitUsings>enable</ImplicitUsings>
<SignAssembly>true</SignAssembly>
<EnforceCodeStyleInBuild>True</EnforceCodeStyleInBuild>
<UserSecretsId>2f0b7cb7-4db2-420e-b6d4-dfd9b437d531</UserSecretsId>
<PlatformTarget>AnyCPU</PlatformTarget>
<AnalysisLevel>preview</AnalysisLevel>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<ServiceWorkerAssetsManifest>service-worker-assets.js</ServiceWorkerAssetsManifest>
<RunAOTCompilation>true</RunAOTCompilation>
<ImplicitUsings>enable</ImplicitUsings>
<SignAssembly>true</SignAssembly>
<EnforceCodeStyleInBuild>True</EnforceCodeStyleInBuild>
<UserSecretsId>2f0b7cb7-4db2-420e-b6d4-dfd9b437d531</UserSecretsId>
<PlatformTarget>AnyCPU</PlatformTarget>
<AnalysisLevel>preview</AnalysisLevel>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.0.4" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="6.0.4" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.0.4" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="6.0.4" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\MovieClient\MovieClient.csproj" />
<ProjectReference Include="..\Shared\BlazorMovie.Shared.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MovieClient\MovieClient.csproj" />
<ProjectReference Include="..\Shared\BlazorMovie.Shared.csproj" />
</ItemGroup>

<ItemGroup>
<ServiceWorker Include="wwwroot\service-worker.js" PublishedContent="wwwroot\service-worker.published.js" />
</ItemGroup>
<ItemGroup>
<ServiceWorker Include="wwwroot\service-worker.js" PublishedContent="wwwroot\service-worker.published.js" />
</ItemGroup>

</Project>
3 changes: 2 additions & 1 deletion BlazorMovie/Maui/App.xaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
<?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:Maui"
x:Class="Maui.App">
Expand Down
44 changes: 15 additions & 29 deletions BlazorMovie/Maui/BlazorMovie.Maui.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows')) and '$(MSBuildRuntimeType)' == 'Full'">$(TargetFrameworks);net6.0-windows10.0.19041</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.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);net6.0-tizen</TargetFrameworks> -->
<OutputType>Exe</OutputType>
<RootNamespace>Maui</RootNamespace>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>
<EnablePreviewMsixTooling>true</EnablePreviewMsixTooling>
<EnableDefaultCssItems>false</EnableDefaultCssItems>
<UserSecretsId>2f0b7cb7-4db2-420e-b6d4-dfd9b437d531</UserSecretsId>
<EnforceCodeStyleInBuild>True</EnforceCodeStyleInBuild>
Expand All @@ -20,18 +21,18 @@

<!-- App Identifier -->
<ApplicationId>com.companyname.maui</ApplicationId>
<ApplicationIdGuid>41307AD0-1D5C-493C-A98D-272C8BA6EA6D</ApplicationIdGuid>

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

<!-- Required for C# Hot Reload -->
<UseInterpreter Condition="'$(Configuration)' == 'Debug'">True</UseInterpreter>

<SupportedOSPlatformVersion Condition="'$(TargetFramework)' == 'net6.0-ios'">14.2</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="'$(TargetFramework)' == 'net6.0-maccatalyst'">14.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="'$(TargetFramework)' == 'net6.0-android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$(TargetFramework.Contains('-windows'))">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$(TargetFramework.Contains('-windows'))">10.0.17763.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">14.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">23.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>
</PropertyGroup>

<ItemGroup>
Expand All @@ -42,7 +43,7 @@
Color="#512BD4" />

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

<!-- Images -->
<MauiImage Include="Resources\Images\*" />
Expand All @@ -54,24 +55,9 @@
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
</ItemGroup>

<ItemGroup Condition="$(TargetFramework.Contains('-windows'))">
<!-- Required - WinUI does not yet have buildTransitive for everything -->
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.0.2" />
<PackageReference Include="Microsoft.Graphics.Win2D" Version="1.0.1" />
</ItemGroup>

<PropertyGroup Condition="$(TargetFramework.Contains('-windows'))">
<OutputType>WinExe</OutputType>
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
</PropertyGroup>

<ItemGroup>
<Content Remove="Properties\launchSettings.json" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\MovieClient\MovieClient.csproj" />
<ProjectReference Include="..\Shared\BlazorMovie.Shared.csproj" />
<ProjectReference Include="..\MovieClient\MovieClient.csproj" />
<ProjectReference Include="..\Shared\BlazorMovie.Shared.csproj" />
</ItemGroup>

</Project>
12 changes: 6 additions & 6 deletions BlazorMovie/Maui/MainPage.xaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:b="clr-namespace:Microsoft.AspNetCore.Components.WebView.Maui;assembly=Microsoft.AspNetCore.Components.WebView.Maui"
xmlns:local="clr-namespace:Maui"
x:Class="Maui.MainPage"
BackgroundColor="{DynamicResource PageBackgroundColor}">

<b:BlazorWebView HostPage="wwwroot/index.html">
<b:BlazorWebView.RootComponents>
<b:RootComponent Selector="#app" ComponentType="{x:Type local:Main}" />
</b:BlazorWebView.RootComponents>
</b:BlazorWebView>
<BlazorWebView HostPage="wwwroot/index.html">
<BlazorWebView.RootComponents>
<RootComponent Selector="#app" ComponentType="{x:Type local:Main}" />
</BlazorWebView.RootComponents>
</BlazorWebView>

</ContentPage>
29 changes: 16 additions & 13 deletions BlazorMovie/Maui/MauiProgram.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,26 @@ public static class MauiProgram
public static MauiApp CreateMauiApp()
{
MauiAppBuilder builder = MauiApp.CreateBuilder();
_ = builder
.RegisterBlazorMauiWebView()
builder
.UseMauiApp<App>()
.ConfigureFonts(fonts =>
{
_ = fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
});
_ = builder.Logging.ClearProviders();
_ = builder.Logging.AddConsole();
_ = builder.Services.AddBlazorWebView();
_ = builder.Services.AddSingleton(sp => new HttpClient { BaseAddress = new Uri("https://movie213.herokuapp.com/") });
_ = builder.Services.AddOptions();
_ = builder.Services.AddAuthorizationCore();
_ = builder.Services.AddSingleton<AccountService>();
_ = builder.Services.AddSingleton<AuthenticationStateProvider, CustomAuthenticationStateProvider>();
_ = builder.Services.AddMudServices();
_ = builder.Services.AddSingleton<ShowAlertService>();
builder.Services.AddMauiBlazorWebView();
#if DEBUG
builder.Services.AddBlazorWebViewDeveloperTools();
#endif
builder.Logging.ClearProviders();
builder.Logging.AddConsole();
builder.Services.AddBlazorWebView();
builder.Services.AddSingleton(sp => new HttpClient { BaseAddress = new Uri("https://movie213.herokuapp.com/") });
builder.Services.AddOptions();
builder.Services.AddAuthorizationCore();
builder.Services.AddSingleton<AccountService>();
builder.Services.AddSingleton<AuthenticationStateProvider, CustomAuthenticationStateProvider>();
builder.Services.AddMudServices();
builder.Services.AddSingleton<ShowAlertService>();

return builder.Build();
}
Expand Down
1 change: 0 additions & 1 deletion BlazorMovie/Maui/Platforms/Android/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="31" />
<application android:allowBackup="true" android:icon="@mipmap/appicon" android:roundIcon="@mipmap/appicon_round" android:supportsRtl="true"></application>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
</manifest>
2 changes: 1 addition & 1 deletion BlazorMovie/Maui/Platforms/Android/MainActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Maui.Platforms.Android;

[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize)]
[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
public class MainActivity : MauiAppCompatActivity
{
}
13 changes: 5 additions & 8 deletions BlazorMovie/Maui/Platforms/Android/MainApplication.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,10 @@ namespace Maui.Platforms.Android;
[Application]
public class MainApplication : MauiApplication
{
public MainApplication(IntPtr handle, JniHandleOwnership ownership)
: base(handle, ownership)
{
}
public MainApplication(IntPtr handle, JniHandleOwnership ownership)
: base(handle, ownership)
{
}

protected override MauiApp CreateMauiApp()
{
return MauiProgram.CreateMauiApp();
}
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
}
5 changes: 1 addition & 4 deletions BlazorMovie/Maui/Platforms/MacCatalyst/AppDelegate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,5 @@ namespace Maui;
[Register("AppDelegate")]
public class AppDelegate : MauiUIApplicationDelegate
{
protected override MauiApp CreateMauiApp()
{
return MauiProgram.CreateMauiApp();
}
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
}
2 changes: 1 addition & 1 deletion BlazorMovie/Maui/Platforms/MacCatalyst/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@
<key>XSAppIconAssets</key>
<string>Assets.xcassets/appicon.appiconset</string>
</dict>
</plist>
</plist>
14 changes: 7 additions & 7 deletions BlazorMovie/Maui/Platforms/MacCatalyst/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ namespace Maui;

public class Program
{
// This is the main entry point of the application.
private static void Main(string[] args)
{
// if you want to use a different Application Delegate class from "AppDelegate"
// you can specify it here.
UIApplication.Main(args, null, typeof(AppDelegate));
}
// This is the main entry point of the application.
static void Main(string[] args)
{
// if you want to use a different Application Delegate class from "AppDelegate"
// you can specify it here.
UIApplication.Main(args, null, typeof(AppDelegate));
}
}
Loading