Revert "build(android): downgrade Avalonia 12 -> 11.3.20 + Avalonia.Maui 11.3.0"
This reverts commit a4bc7b5e6a.
This commit is contained in:
parent
a4bc7b5e6a
commit
77a7693276
8 changed files with 30 additions and 74 deletions
|
|
@ -3,20 +3,18 @@
|
|||
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Packages.props', '$(MSBuildThisFileDirectory)../'))" />
|
||||
<!-- PostIt-product-specific versions -->
|
||||
<ItemGroup>
|
||||
<PackageVersion Include="Avalonia" Version="11.3.20" />
|
||||
<PackageVersion Include="Avalonia.Android" Version="11.3.20" />
|
||||
<PackageVersion Include="Avalonia.AvaloniaEdit" Version="11.3.20" />
|
||||
<PackageVersion Include="Avalonia.Browser" Version="11.3.20" />
|
||||
<PackageVersion Include="Avalonia.Desktop" Version="11.3.20" />
|
||||
<PackageVersion Include="Avalonia.Fonts.Inter" Version="11.3.20" />
|
||||
<PackageVersion Include="Avalonia.Maui" Version="11.3.0" />
|
||||
<PackageVersion Include="Avalonia.Themes.Fluent" Version="11.3.20" />
|
||||
<PackageVersion Include="Avalonia" Version="12.1.1" />
|
||||
<PackageVersion Include="Avalonia.Android" Version="12.1.1" />
|
||||
<PackageVersion Include="Avalonia.AvaloniaEdit" Version="12.0.0" />
|
||||
<PackageVersion Include="Avalonia.Browser" Version="12.1.1" />
|
||||
<PackageVersion Include="Avalonia.Desktop" Version="12.1.1" />
|
||||
<PackageVersion Include="Avalonia.Fonts.Inter" Version="12.1.1" />
|
||||
<PackageVersion Include="Avalonia.Themes.Fluent" Version="12.1.1" />
|
||||
<PackageVersion Include="AvaloniaUI.DiagnosticsSupport" Version="2.2.3" />
|
||||
<PackageVersion Include="CommunityToolkit.Mvvm" Version="8.4.2" />
|
||||
<PackageVersion Include="Material.Avalonia" Version="3.19.0" />
|
||||
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="10.0.11" />
|
||||
<PackageVersion Include="Microsoft.Maui.Essentials" Version="8.0.100" />
|
||||
<PackageVersion Include="Microsoft.Maui.Controls" Version="8.0.100" />
|
||||
<PackageVersion Include="Microsoft.Maui.Essentials" Version="10.0.100" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.Browser" Version="1.10.0.1" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.Core.SplashScreen" Version="1.2.0.3" />
|
||||
</ItemGroup>
|
||||
|
|
|
|||
|
|
@ -1,19 +1,21 @@
|
|||
using Android.App;
|
||||
using Android.App;
|
||||
using Android.Runtime;
|
||||
using Avalonia;
|
||||
using Avalonia.Android;
|
||||
|
||||
namespace PostIt.Android;
|
||||
|
||||
/// <summary>
|
||||
/// Bare <see cref="Android.App.Application"/> shell for Android. Avalonia
|
||||
/// 11 initialises its platform services from <see cref="MainActivity"/>
|
||||
/// (which extends <c>AvaloniaMainActivity<App></c>); no per-Application
|
||||
/// Avalonia setup is needed here. Kept only so that the [Application] entry
|
||||
/// stays present in the merged manifest, which the Android runtime expects
|
||||
/// when the manifest declares a custom android:name in the application tag.
|
||||
/// </summary>
|
||||
[Application]
|
||||
public class Application : Android.App.Application
|
||||
namespace PostIt.Android
|
||||
{
|
||||
public Application(nint javaReference, JniHandleOwnership transfer) : base(javaReference, transfer)
|
||||
[Application]
|
||||
public class Application : AvaloniaAndroidApplication<App>
|
||||
{
|
||||
protected Application(nint javaReference, JniHandleOwnership transfer) : base(javaReference, transfer)
|
||||
{
|
||||
}
|
||||
|
||||
protected override AppBuilder CustomizeAppBuilder(AppBuilder builder)
|
||||
{
|
||||
return base.CustomizeAppBuilder(builder)
|
||||
.WithInterFont();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2,7 +2,6 @@ using Android.App;
|
|||
using Android.Content.PM;
|
||||
using Android.Content;
|
||||
using Avalonia.Android;
|
||||
using Avalonia;
|
||||
using AndroidX.Emoji2.Text;
|
||||
|
||||
namespace PostIt.Android;
|
||||
|
|
@ -15,15 +14,8 @@ namespace PostIt.Android;
|
|||
MainLauncher = true,
|
||||
LaunchMode = LaunchMode.SingleTask,
|
||||
ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.ScreenSize | ConfigChanges.UiMode)]
|
||||
public class MainActivity : AvaloniaMainActivity<App>
|
||||
public class MainActivity : AvaloniaMainActivity
|
||||
{
|
||||
protected override AppBuilder CustomizeAppBuilder(AppBuilder builder)
|
||||
{
|
||||
return base.CustomizeAppBuilder(builder)
|
||||
.UseMaui<PostIt.Maui.MauiEmbeddingApp>(this)
|
||||
.WithInterFont();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Strongly-typed handle to the current MainActivity instance, set in
|
||||
/// <see cref="OnCreate"/> and consumed by platform services such as
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net9.0-android36.0</TargetFramework>
|
||||
<TargetFramework>net10.0-android</TargetFramework>
|
||||
<!-- FORCE LES ARCHITECTURES ANDROID VALIDES -->
|
||||
<RuntimeIdentifiers>android-arm64;android-x64</RuntimeIdentifiers>
|
||||
<SupportedOSPlatformVersion>23.0.0</SupportedOSPlatformVersion>
|
||||
|
|
@ -24,7 +24,6 @@
|
|||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Avalonia.Android" />
|
||||
<PackageReference Include="Avalonia.Maui" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\PostIt\PostIt.csproj" />
|
||||
|
|
|
|||
|
|
@ -1,35 +0,0 @@
|
|||
using Microsoft.Maui.Controls;
|
||||
|
||||
namespace PostIt.Maui;
|
||||
|
||||
/// <summary>
|
||||
/// Empty MAUI application registered as the embedding host for
|
||||
/// <c>Avalonia.Maui</c>. <c>Avalonia.Maui</c> expects a
|
||||
/// <see cref="Microsoft.Maui.Controls.Application"/>-derived type so that
|
||||
/// its <c>.UseMaui<TMauiApp>(activity)</c> extension can build the
|
||||
/// embedding pipeline (services, handlers, <c>IPlatformApplication</c>).
|
||||
///
|
||||
/// We never actually display any MAUI controls — the embedding sits in front
|
||||
/// of Avalonia so that Avalonia's Android platform layer (which is otherwise
|
||||
/// bound to a stub on Avalonia 12 / present-but-broken on Avalonia 11 without
|
||||
/// MAUI) gets the real Android <c>Context</c> and runs the surface view
|
||||
/// lifecycle correctly. This class exists to satisfy the generic constraint
|
||||
/// of <c>UseMaui<TMauiApp></c> and gives MAUI something to attach its
|
||||
/// handler tree to.
|
||||
///
|
||||
/// Override <c>CreateWindow</c> with a no-op or leave the default; the
|
||||
/// virtual MAUI window is consumed by <c>Avalonia.Maui</c>'s embedding and
|
||||
/// never surfaces to the user (Avalonia owns the visual tree).
|
||||
/// </summary>
|
||||
public class MauiEmbeddingApp : Application
|
||||
{
|
||||
public MauiEmbeddingApp()
|
||||
{
|
||||
}
|
||||
|
||||
protected override Window CreateWindow(IActivationState? activationState)
|
||||
{
|
||||
// No-op window: Avalonia.Maui wraps it and never shows it.
|
||||
return new Window();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net9.0</TargetFrameworks>
|
||||
<TargetFrameworks>net10.0</TargetFrameworks>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Description> A shared model for a little client/server app, dealing about establishing some contract, between some human client and provider.
|
||||
</Description>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<RootNamespace>Yavsc.Api.Client</RootNamespace>
|
||||
<AssemblyName>Yavsc.Api.Client</AssemblyName>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue