Skip to content

Commit

Permalink
update to .net 9
Browse files Browse the repository at this point in the history
  • Loading branch information
VladislavAntonyuk committed Oct 22, 2024
1 parent c9fc1b5 commit c2b95ff
Show file tree
Hide file tree
Showing 127 changed files with 518 additions and 359 deletions.
14 changes: 7 additions & 7 deletions AndroidBindableLibraries/Balloon/Balloon.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<SupportedOSPlatformVersion>23</SupportedOSPlatformVersion>
<PackageId>VladislavAntonyuk.$(AssemblyName)</PackageId>
<Version>1.6.4</Version>
<Version>1.6.4.1</Version>
<PackageReadmeFile>ReadMe.md</PackageReadmeFile>
<PackageOutputPath>..\..\LocalPackages\</PackageOutputPath>
</PropertyGroup>
Expand All @@ -18,22 +18,22 @@
<Version>8.4.0</Version>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Lifecycle.Runtime.Ktx">
<Version>2.7.0.2</Version>
<Version>2.8.5.1</Version>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Annotation">
<Version>1.7.1.2</Version>
<Version>1.8.2.1</Version>
</PackageReference>
<PackageReference Include="Xamarin.Kotlin.StdLib">
<Version>1.9.23.1</Version>
<Version>2.0.10.1</Version>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.AppCompat">
<Version>1.6.1.8</Version>
<Version>1.7.0.3</Version>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Core.Core.Ktx">
<Version>1.13.1</Version>
<Version>1.13.1.5</Version>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Fragment.Ktx">
<Version>1.7.0</Version>
<Version>1.8.3.1</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion AndroidBindableLibraries/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Project>
<PropertyGroup>
<TargetFramework>net8.0-android</TargetFramework>
<TargetFramework>net9.0-android</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<SupportedOSPlatformVersion>23</SupportedOSPlatformVersion>
<PackageId>VladislavAntonyuk.$(AssemblyName)</PackageId>
<Version>1.9.0</Version>
<Version>1.9.0.1</Version>
<PackageReadmeFile>ReadMe.md</PackageReadmeFile>
<PackageOutputPath>..\..\LocalPackages\</PackageOutputPath>
</PropertyGroup>
Expand All @@ -17,28 +17,28 @@
<AndroidMavenLibrary Include="com.annimon:stream" Version="1.2.2" Bind="false" />
<AndroidMavenLibrary Include="com.applandeo:material-calendar-view" Version="1.9.0" />
<PackageReference Include="Xamarin.AndroidX.AppCompat">
<Version>1.6.1.7</Version>
<Version>1.7.0.3</Version>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.ConstraintLayout">
<Version>2.1.4.10</Version>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Core.Core.Ktx">
<Version>1.12.0.4</Version>
<Version>1.13.1.5</Version>
</PackageReference>
<PackageReference Include="Xamarin.Kotlin.StdLib">
<Version>1.9.23</Version>
<Version>2.0.10.1</Version>
</PackageReference>
<PackageReference Include="Xamarin.Kotlin.StdLib.Jdk8">
<Version>1.9.23</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.AndroidX.Collection" Version="1.4.0.2" />
<PackageReference Include="Xamarin.AndroidX.Collection.Jvm" Version="1.4.0.1" />
<PackageReference Include="Xamarin.AndroidX.Collection.Ktx" Version="1.4.0.1" />
<PackageReference Include="Xamarin.AndroidX.Collection" Version="1.4.3.1" />
<PackageReference Include="Xamarin.AndroidX.Collection.Jvm" Version="1.4.3.1" />
<PackageReference Include="Xamarin.AndroidX.Collection.Ktx" Version="1.4.3.1" />

<PackageReference Include="Xamarin.AndroidX.Fragment.Ktx">
<Version>1.6.2.2</Version>
<Version>1.8.3.1</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
Expand Down
18 changes: 10 additions & 8 deletions AndroidBindableLibraries/Sample/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
namespace Sample
namespace Sample;

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

MainPage = new AppShell();
}
protected override Window CreateWindow(IActivationState? activationState)
{
return new Window(new AppShell());
}
}
}
13 changes: 6 additions & 7 deletions AndroidBindableLibraries/Sample/AppShell.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
namespace Sample
namespace Sample;

public partial class AppShell : Shell
{
public partial class AppShell : Shell
public AppShell()
{
public AppShell()
{
InitializeComponent();
}
InitializeComponent();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,8 @@ protected override void ConnectHandler(Calendar platformView)
private void PlatformView_SelectedDatesChanged(object? sender, CalendarDayClickEventArgs e)
{
var calendar = e.CalendarDay.Calendar;
var time = TimeSpan.FromMilliseconds(calendar.TimeInMillis);
var result = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
VirtualView.SelectedDate = new DateTimeOffset(result.Add(time).Add(TimeSpan.FromMilliseconds(calendar.TimeZone.RawOffset)));
var result = new DateTimeOffset(new DateTime(1970, 1, 1, 0, 0, 0));
VirtualView.SelectedDate = result.AddMilliseconds(calendar.TimeInMillis).Add(result.Offset);
VirtualView.OnSelectedDateChanged(VirtualView.SelectedDate);
}

Expand Down
89 changes: 44 additions & 45 deletions AndroidBindableLibraries/Sample/MainPage.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,52 +1,51 @@
namespace Sample
{
using Android.Views;
using Com.Skydoves.Balloon;
using Microsoft.Maui.Platform;
namespace Sample;

public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();
}
using Android.Views;
using Com.Skydoves.Balloon;
using Microsoft.Maui.Platform;

private void OnCounterClicked(object sender, EventArgs e)
{
var balloon = new Balloon.Builder(Platform.AppContext)
.SetText("Edit your profile here!")
.SetTextSize(15f)
.SetArrowPositionRules(ArrowPositionRules.AlignAnchor)
.SetArrowSize(10)
.SetArrowPosition(0.5f)
.SetPadding(12)
.SetCornerRadius(8f)
.SetBalloonAnimation(BalloonAnimation.Elastic)
.SetOnBalloonDismissListener(new BallonDismissListener(() =>
{
var balloon2 = new Balloon.Builder(Platform.AppContext)
.SetWidthRatio(1.0f)
.SetHeight(BalloonSizeSpec.Wrap)
.SetLayout(new BallonContent().ToPlatform(Handler.MauiContext))
.SetArrowPositionRules(ArrowPositionRules.AlignAnchor)
.SetArrowSize(10)
.SetArrowPosition(0.5f)
.SetPadding(12)
.SetCornerRadius(8f)
.SetBalloonAnimation(BalloonAnimation.Fade)
.Build();
balloon2.ShowAtCenter(MauiLabel.ToPlatform(MauiLabel.Handler.MauiContext));
}))
.Build();
balloon.ShowAtCenter(CounterBtn.ToPlatform(CounterBtn.Handler.MauiContext));
}
public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();
}

internal class BallonDismissListener(Action action) : Java.Lang.Object, IOnBalloonDismissListener
private void OnCounterClicked(object sender, EventArgs e)
{
public void OnBalloonDismiss()
{
action();
}
var balloon = new Balloon.Builder(Platform.AppContext)
.SetText("Edit your profile here!")
.SetTextSize(15f)
.SetArrowPositionRules(ArrowPositionRules.AlignAnchor)
.SetArrowSize(10)
.SetArrowPosition(0.5f)
.SetPadding(12)
.SetCornerRadius(8f)
.SetBalloonAnimation(BalloonAnimation.Elastic)
.SetOnBalloonDismissListener(new BallonDismissListener(() =>
{
var balloon2 = new Balloon.Builder(Platform.AppContext)
.SetWidthRatio(1.0f)
.SetHeight(BalloonSizeSpec.Wrap)
.SetLayout(new BallonContent().ToPlatform(Handler.MauiContext))
.SetArrowPositionRules(ArrowPositionRules.AlignAnchor)
.SetArrowSize(10)
.SetArrowPosition(0.5f)
.SetPadding(12)
.SetCornerRadius(8f)
.SetBalloonAnimation(BalloonAnimation.Fade)
.Build();
balloon2.ShowAtCenter(MauiLabel.ToPlatform(MauiLabel.Handler.MauiContext));
}))
.Build();
balloon.ShowAtCenter(CounterBtn.ToPlatform(CounterBtn.Handler.MauiContext));
}
}

internal class BallonDismissListener(Action action) : Java.Lang.Object, IOnBalloonDismissListener
{
public void OnBalloonDismiss()
{
action();
}
}
43 changes: 21 additions & 22 deletions AndroidBindableLibraries/Sample/MauiProgram.cs
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
namespace Sample
{
using Calendar;
using MauiBells.Calendar;
namespace Sample;

using Calendar;
using MauiBells.Calendar;

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

return builder.Build();
}
return builder.Build();
}
}
}
19 changes: 9 additions & 10 deletions AndroidBindableLibraries/Sample/Platforms/Android/MainActivity.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
namespace Sample
{
using Android.App;
using Android.Content.PM;
using Android.OS;
namespace Sample;

using Android.App;
using Android.Content.PM;
using Android.OS;

[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, LaunchMode = LaunchMode.SingleTop, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
public class MainActivity : MauiAppCompatActivity
{
}
}
[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, LaunchMode = LaunchMode.SingleTop, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
public class MainActivity : MauiAppCompatActivity
{
}
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
namespace Sample
{
using Android.App;
using Android.Runtime;
namespace Sample;

[Application]
public class MainApplication : MauiApplication
{
public MainApplication(IntPtr handle, JniHandleOwnership ownership)
: base(handle, ownership)
{
}
using Android.App;
using Android.Runtime;

protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
[Application]
public class MainApplication : MauiApplication
{
public MainApplication(IntPtr handle, JniHandleOwnership ownership)
: base(handle, ownership)
{
}
}

protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
}
7 changes: 3 additions & 4 deletions AndroidBindableLibraries/Sample/Sample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.21" />
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="8.0.21" />
<PackageReference Include="VladislavAntonyuk.Balloon" Version="1.6.4" />
<PackageReference Include="VladislavAntonyuk.MaterialCalendarView" Version="1.9.0" />
<PackageReference Include="Microsoft.Maui.Controls" Version="9.0.0-rc.2.24503.2" />
<PackageReference Include="VladislavAntonyuk.Balloon" Version="1.6.4.1" />
<PackageReference Include="VladislavAntonyuk.MaterialCalendarView" Version="1.9.0.1" />
</ItemGroup>


Expand Down
2 changes: 1 addition & 1 deletion Auth/AuthServices/AuthServices.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Identity.Client" Version="4.61.3" />
<PackageReference Include="Microsoft.Identity.Client" Version="4.66.0" />
</ItemGroup>

</Project>
8 changes: 7 additions & 1 deletion Auth/MauiAuth/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@

public partial class App : Application
{
private readonly MainPage mainPage;

public App(MainPage mainPage)
{
this.mainPage = mainPage;
InitializeComponent();
}

MainPage = new NavigationPage(mainPage);
protected override Window CreateWindow(IActivationState? activationState)
{
return new Window(new NavigationPage(mainPage));
}
}
4 changes: 2 additions & 2 deletions Auth/MauiAuth/MauiAuth.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="CommunityToolkit.Maui" Version="9.0.1" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.2" />
<PackageReference Include="CommunityToolkit.Maui" Version="9.1.0" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.3.2" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading

0 comments on commit c2b95ff

Please sign in to comment.