Skip to content

Commit c29a942

Browse files
update to .net 9
1 parent c9fc1b5 commit c29a942

File tree

173 files changed

+662
-949
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

173 files changed

+662
-949
lines changed

.github/workflows/dotnet.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
strategy:
1818
fail-fast: false
1919
matrix:
20-
os: [windows-latest, macos-13]
20+
os: [windows-latest, macos-14]
2121

2222
steps:
2323
- name: Prepare variables on Windows
@@ -26,7 +26,7 @@ jobs:
2626
echo "WORKING_DIRECTORY_PATH=C:/Projects/MauiSamples" >> $env:GITHUB_ENV
2727
2828
- name: Prepare variables on macOS
29-
if: ${{ matrix.os == 'macos-13' }}
29+
if: ${{ matrix.os == 'macos-14' }}
3030
run: |
3131
echo "WORKING_DIRECTORY_PATH=/Users/runner/Projects/MauiSamples" >> $GITHUB_ENV
3232
@@ -37,15 +37,15 @@ jobs:
3737
git checkout ${{ github.head_ref || github.ref_name }}
3838
3939
- name: Setup Xcode
40-
if: ${{ matrix.os == 'macos-13' }}
40+
if: ${{ matrix.os == 'macos-14' }}
4141
uses: maxim-lobanov/setup-xcode@v1
4242
with:
43-
xcode-version: '15.1'
43+
xcode-version: '16.0'
4444

4545
- name: Setup .NET
46-
uses: actions/setup-dotnet@v3
46+
uses: actions/setup-dotnet@v4
4747
with:
48-
dotnet-version: 8.x
48+
dotnet-version: 9.x
4949

5050
- name: Install dependencies
5151
run: dotnet workload install maui
@@ -60,4 +60,4 @@ jobs:
6060
run: |
6161
cd ${{ env.WORKING_DIRECTORY_PATH }}
6262
dotnet restore --configfile NuGet.config
63-
dotnet build --tl
63+
dotnet build

AndroidBindableLibraries/Balloon/Balloon.csproj

+7-7
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<PropertyGroup>
33
<SupportedOSPlatformVersion>23</SupportedOSPlatformVersion>
44
<PackageId>VladislavAntonyuk.$(AssemblyName)</PackageId>
5-
<Version>1.6.4</Version>
5+
<Version>1.6.4.1</Version>
66
<PackageReadmeFile>ReadMe.md</PackageReadmeFile>
77
<PackageOutputPath>..\..\LocalPackages\</PackageOutputPath>
88
</PropertyGroup>
@@ -18,22 +18,22 @@
1818
<Version>8.4.0</Version>
1919
</PackageReference>
2020
<PackageReference Include="Xamarin.AndroidX.Lifecycle.Runtime.Ktx">
21-
<Version>2.7.0.2</Version>
21+
<Version>2.8.5.1</Version>
2222
</PackageReference>
2323
<PackageReference Include="Xamarin.AndroidX.Annotation">
24-
<Version>1.7.1.2</Version>
24+
<Version>1.8.2.1</Version>
2525
</PackageReference>
2626
<PackageReference Include="Xamarin.Kotlin.StdLib">
27-
<Version>1.9.23.1</Version>
27+
<Version>2.0.10.1</Version>
2828
</PackageReference>
2929
<PackageReference Include="Xamarin.AndroidX.AppCompat">
30-
<Version>1.6.1.8</Version>
30+
<Version>1.7.0.3</Version>
3131
</PackageReference>
3232
<PackageReference Include="Xamarin.AndroidX.Core.Core.Ktx">
33-
<Version>1.13.1</Version>
33+
<Version>1.13.1.5</Version>
3434
</PackageReference>
3535
<PackageReference Include="Xamarin.AndroidX.Fragment.Ktx">
36-
<Version>1.7.0</Version>
36+
<Version>1.8.3.1</Version>
3737
</PackageReference>
3838
</ItemGroup>
3939
<ItemGroup>

AndroidBindableLibraries/Directory.Build.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Project>
33
<PropertyGroup>
4-
<TargetFramework>net8.0-android</TargetFramework>
4+
<TargetFramework>net9.0-android</TargetFramework>
55
<Nullable>enable</Nullable>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>

AndroidBindableLibraries/MaterialCalendarView/MaterialCalendarView.csproj

+8-8
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<PropertyGroup>
33
<SupportedOSPlatformVersion>23</SupportedOSPlatformVersion>
44
<PackageId>VladislavAntonyuk.$(AssemblyName)</PackageId>
5-
<Version>1.9.0</Version>
5+
<Version>1.9.0.1</Version>
66
<PackageReadmeFile>ReadMe.md</PackageReadmeFile>
77
<PackageOutputPath>..\..\LocalPackages\</PackageOutputPath>
88
</PropertyGroup>
@@ -17,28 +17,28 @@
1717
<AndroidMavenLibrary Include="com.annimon:stream" Version="1.2.2" Bind="false" />
1818
<AndroidMavenLibrary Include="com.applandeo:material-calendar-view" Version="1.9.0" />
1919
<PackageReference Include="Xamarin.AndroidX.AppCompat">
20-
<Version>1.6.1.7</Version>
20+
<Version>1.7.0.3</Version>
2121
</PackageReference>
2222
<PackageReference Include="Xamarin.AndroidX.ConstraintLayout">
2323
<Version>2.1.4.10</Version>
2424
</PackageReference>
2525
<PackageReference Include="Xamarin.AndroidX.Core.Core.Ktx">
26-
<Version>1.12.0.4</Version>
26+
<Version>1.13.1.5</Version>
2727
</PackageReference>
2828
<PackageReference Include="Xamarin.Kotlin.StdLib">
29-
<Version>1.9.23</Version>
29+
<Version>2.0.10.1</Version>
3030
</PackageReference>
3131
<PackageReference Include="Xamarin.Kotlin.StdLib.Jdk8">
3232
<Version>1.9.23</Version>
3333
</PackageReference>
3434
</ItemGroup>
3535
<ItemGroup>
36-
<PackageReference Include="Xamarin.AndroidX.Collection" Version="1.4.0.2" />
37-
<PackageReference Include="Xamarin.AndroidX.Collection.Jvm" Version="1.4.0.1" />
38-
<PackageReference Include="Xamarin.AndroidX.Collection.Ktx" Version="1.4.0.1" />
36+
<PackageReference Include="Xamarin.AndroidX.Collection" Version="1.4.3.1" />
37+
<PackageReference Include="Xamarin.AndroidX.Collection.Jvm" Version="1.4.3.1" />
38+
<PackageReference Include="Xamarin.AndroidX.Collection.Ktx" Version="1.4.3.1" />
3939

4040
<PackageReference Include="Xamarin.AndroidX.Fragment.Ktx">
41-
<Version>1.6.2.2</Version>
41+
<Version>1.8.3.1</Version>
4242
</PackageReference>
4343
</ItemGroup>
4444
<ItemGroup>
+10-8
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
namespace Sample
1+
namespace Sample;
2+
3+
public partial class App : Application
24
{
3-
public partial class App : Application
5+
public App()
46
{
5-
public App()
6-
{
7-
InitializeComponent();
7+
InitializeComponent();
8+
}
89

9-
MainPage = new AppShell();
10-
}
10+
protected override Window CreateWindow(IActivationState? activationState)
11+
{
12+
return new Window(new AppShell());
1113
}
12-
}
14+
}
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
namespace Sample
1+
namespace Sample;
2+
3+
public partial class AppShell : Shell
24
{
3-
public partial class AppShell : Shell
5+
public AppShell()
46
{
5-
public AppShell()
6-
{
7-
InitializeComponent();
8-
}
7+
InitializeComponent();
98
}
10-
}
9+
}

AndroidBindableLibraries/Sample/Calendar/CalendarMaterialHandler.cs

+2-3
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,8 @@ protected override void ConnectHandler(Calendar platformView)
3939
private void PlatformView_SelectedDatesChanged(object? sender, CalendarDayClickEventArgs e)
4040
{
4141
var calendar = e.CalendarDay.Calendar;
42-
var time = TimeSpan.FromMilliseconds(calendar.TimeInMillis);
43-
var result = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
44-
VirtualView.SelectedDate = new DateTimeOffset(result.Add(time).Add(TimeSpan.FromMilliseconds(calendar.TimeZone.RawOffset)));
42+
var result = new DateTimeOffset(new DateTime(1970, 1, 1, 0, 0, 0));
43+
VirtualView.SelectedDate = result.AddMilliseconds(calendar.TimeInMillis).Add(result.Offset);
4544
VirtualView.OnSelectedDateChanged(VirtualView.SelectedDate);
4645
}
4746

Original file line numberDiff line numberDiff line change
@@ -1,52 +1,51 @@
1-
namespace Sample
2-
{
3-
using Android.Views;
4-
using Com.Skydoves.Balloon;
5-
using Microsoft.Maui.Platform;
1+
namespace Sample;
62

7-
public partial class MainPage : ContentPage
8-
{
9-
public MainPage()
10-
{
11-
InitializeComponent();
12-
}
3+
using Android.Views;
4+
using Com.Skydoves.Balloon;
5+
using Microsoft.Maui.Platform;
136

14-
private void OnCounterClicked(object sender, EventArgs e)
15-
{
16-
var balloon = new Balloon.Builder(Platform.AppContext)
17-
.SetText("Edit your profile here!")
18-
.SetTextSize(15f)
19-
.SetArrowPositionRules(ArrowPositionRules.AlignAnchor)
20-
.SetArrowSize(10)
21-
.SetArrowPosition(0.5f)
22-
.SetPadding(12)
23-
.SetCornerRadius(8f)
24-
.SetBalloonAnimation(BalloonAnimation.Elastic)
25-
.SetOnBalloonDismissListener(new BallonDismissListener(() =>
26-
{
27-
var balloon2 = new Balloon.Builder(Platform.AppContext)
28-
.SetWidthRatio(1.0f)
29-
.SetHeight(BalloonSizeSpec.Wrap)
30-
.SetLayout(new BallonContent().ToPlatform(Handler.MauiContext))
31-
.SetArrowPositionRules(ArrowPositionRules.AlignAnchor)
32-
.SetArrowSize(10)
33-
.SetArrowPosition(0.5f)
34-
.SetPadding(12)
35-
.SetCornerRadius(8f)
36-
.SetBalloonAnimation(BalloonAnimation.Fade)
37-
.Build();
38-
balloon2.ShowAtCenter(MauiLabel.ToPlatform(MauiLabel.Handler.MauiContext));
39-
}))
40-
.Build();
41-
balloon.ShowAtCenter(CounterBtn.ToPlatform(CounterBtn.Handler.MauiContext));
42-
}
7+
public partial class MainPage : ContentPage
8+
{
9+
public MainPage()
10+
{
11+
InitializeComponent();
4312
}
4413

45-
internal class BallonDismissListener(Action action) : Java.Lang.Object, IOnBalloonDismissListener
14+
private void OnCounterClicked(object sender, EventArgs e)
4615
{
47-
public void OnBalloonDismiss()
48-
{
49-
action();
50-
}
16+
var balloon = new Balloon.Builder(Platform.AppContext)
17+
.SetText("Edit your profile here!")
18+
.SetTextSize(15f)
19+
.SetArrowPositionRules(ArrowPositionRules.AlignAnchor)
20+
.SetArrowSize(10)
21+
.SetArrowPosition(0.5f)
22+
.SetPadding(12)
23+
.SetCornerRadius(8f)
24+
.SetBalloonAnimation(BalloonAnimation.Elastic)
25+
.SetOnBalloonDismissListener(new BallonDismissListener(() =>
26+
{
27+
var balloon2 = new Balloon.Builder(Platform.AppContext)
28+
.SetWidthRatio(1.0f)
29+
.SetHeight(BalloonSizeSpec.Wrap)
30+
.SetLayout(new BallonContent().ToPlatform(Handler.MauiContext))
31+
.SetArrowPositionRules(ArrowPositionRules.AlignAnchor)
32+
.SetArrowSize(10)
33+
.SetArrowPosition(0.5f)
34+
.SetPadding(12)
35+
.SetCornerRadius(8f)
36+
.SetBalloonAnimation(BalloonAnimation.Fade)
37+
.Build();
38+
balloon2.ShowAtCenter(MauiLabel.ToPlatform(MauiLabel.Handler.MauiContext));
39+
}))
40+
.Build();
41+
balloon.ShowAtCenter(CounterBtn.ToPlatform(CounterBtn.Handler.MauiContext));
5142
}
5243
}
44+
45+
internal class BallonDismissListener(Action action) : Java.Lang.Object, IOnBalloonDismissListener
46+
{
47+
public void OnBalloonDismiss()
48+
{
49+
action();
50+
}
51+
}
+21-22
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,25 @@
1-
namespace Sample
2-
{
3-
using Calendar;
4-
using MauiBells.Calendar;
1+
namespace Sample;
2+
3+
using Calendar;
4+
using MauiBells.Calendar;
55

6-
public static class MauiProgram
6+
public static class MauiProgram
7+
{
8+
public static MauiApp CreateMauiApp()
79
{
8-
public static MauiApp CreateMauiApp()
9-
{
10-
var builder = MauiApp.CreateBuilder();
11-
builder
12-
.UseMauiApp<App>()
13-
.ConfigureFonts(fonts =>
14-
{
15-
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
16-
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
17-
})
18-
.ConfigureMauiHandlers(x =>
19-
{
20-
x.AddHandler<CalendarView, CalendarMaterialHandler>();
21-
});
10+
var builder = MauiApp.CreateBuilder();
11+
builder
12+
.UseMauiApp<App>()
13+
.ConfigureFonts(fonts =>
14+
{
15+
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
16+
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
17+
})
18+
.ConfigureMauiHandlers(x =>
19+
{
20+
x.AddHandler<CalendarView, CalendarMaterialHandler>();
21+
});
2222

23-
return builder.Build();
24-
}
23+
return builder.Build();
2524
}
26-
}
25+
}
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
namespace Sample
2-
{
3-
using Android.App;
4-
using Android.Content.PM;
5-
using Android.OS;
1+
namespace Sample;
2+
3+
using Android.App;
4+
using Android.Content.PM;
5+
using Android.OS;
66

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

6-
[Application]
7-
public class MainApplication : MauiApplication
8-
{
9-
public MainApplication(IntPtr handle, JniHandleOwnership ownership)
10-
: base(handle, ownership)
11-
{
12-
}
3+
using Android.App;
4+
using Android.Runtime;
135

14-
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
6+
[Application]
7+
public class MainApplication : MauiApplication
8+
{
9+
public MainApplication(IntPtr handle, JniHandleOwnership ownership)
10+
: base(handle, ownership)
11+
{
1512
}
16-
}
13+
14+
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
15+
}

0 commit comments

Comments
 (0)