Skip to content

[DO NOT MERGE][net10.0] 20250414 net10.0 ecosytem updates #28997

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

Draft
wants to merge 35 commits into
base: net10.0
Choose a base branch
from

Conversation

moljac
Copy link
Contributor

@moljac moljac commented Apr 15, 2025

Description of Change

Android Ecosystem updates

Test of new packages for net10.0 and net8.0 from:

https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=11405413&view=results

Nuget feed is needed to replace:

    <add key="android-libraries-20250422-1806" value="https://pkgs.dev.azure.com/xamarin/public/_packaging/android-libraries-20250422-1806/nuget/v3/index.json" />    

or:

    <add key="android-libraries-20250422-1806" value="https://dev.azure.com/xamarin/public/_artifacts/feed/androidx-net10/" />    

in:

https://github.com/dotnet/maui/pull/28997/files#diff-9c5952957709545aad811b400e7e516eebade1e44fc4fbc23203403ffeb92c34R12

https://github.com/dotnet/maui/pull/28997/files#diff-9043b7cbd46d4c166caa882ee5dcd4df93afa7ae708084e4b87dfd69a8a18332R5

https://github.com/dotnet/maui/pull/28997/files#diff-a3fe4195a9d68f36997476b59feb7397e4fcc8fe0993b7174b2fddad7fd96a8eR8

@Copilot Copilot AI review requested due to automatic review settings April 15, 2025 09:37
@moljac moljac requested a review from a team as a code owner April 15, 2025 09:37
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.

Files not reviewed (10)
  • NuGet.config: Language not supported
  • eng/AndroidX.targets: Language not supported
  • eng/Versions.props: Language not supported
  • eng/common/internal/NuGet.config: Language not supported
  • eng/common/sdl/NuGet.config: Language not supported
  • src/Compatibility/Android.AppLinks/src/Compatibility.Android.AppLinks.csproj: Language not supported
  • src/Compatibility/Maps/src/Android/Compatibility.Maps.Android.csproj: Language not supported
  • src/Controls/Foldable/src/Controls.Foldable.csproj: Language not supported
  • src/Core/src/Core.csproj: Language not supported
  • src/Essentials/src/Essentials.csproj: Language not supported

@moljac moljac marked this pull request as draft April 15, 2025 09:37
@moljac
Copy link
Contributor Author

moljac commented Apr 29, 2025

/rebase

@moljac
Copy link
Contributor Author

moljac commented May 12, 2025

Error to be fixed in metadata:

2025-05-12T10:18:43.9080480Z /Users/builder/azdo/_work/2/s/src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellFlyoutTemplatedContentRenderer.cs(26,5): error CS0535: 'ShellFlyoutTemplatedContentRenderer' does not implement interface member 'AppBarLayout.IOnOffsetChangedListener.OnOffsetChanged(Object?, int)' [/Users/builder/azdo/_work/2/s/src/Controls/src/Core/Controls.Core.csproj::TargetFramework=net10.0-android36.0]
2025-05-12T10:18:43.9082940Z /Users/builder/azdo/_work/2/s/src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellFlyoutTemplatedContentRenderer.cs(26,5): error CS0535: 'ShellFlyoutTemplatedContentRenderer' does not implement interface member 'AppBarLayout.IBaseOnOffsetChangedListener.OnOffsetChanged(Object?, int)' [/Users/builder/azdo/_work/2/s/src/Controls/src/Core/Controls.Core.csproj::TargetFramework=net10.0-android36.0]

src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellFlyoutTemplatedContentRenderer.cs(583,15): error RS0036: Symbol 'OnOffsetChanged' is missing nullability annotations in the declared API (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)
src/Controls/src/Core/PublicAPI/net-android/PublicAPI.Unshipped.txt(75,1): error RS0025: The symbol '~Microsoft.Maui.Controls.Platform.Compatibility.ShellFlyoutTemplatedContentRenderer.OnOffsetChanged(Google.Android.Material.AppBar.AppBarLayout? appBarLayout, int verticalOffset) -> void' appears more than once in the public API files (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)
src/Controls/tests/DeviceTests/Elements/Button/ButtonTests.Android.cs(100,20): error CS8602: Dereference of a possibly null reference.
@PureWeen PureWeen moved this from Todo to Changes Requested in MAUI SDK Ongoing May 20, 2025
jonathanpeppers added a commit to dotnet/android-libraries that referenced this pull request May 23, 2025
Context: dotnet/maui#28997
Context: #1148

.NET 10 binding assemblies have changes to generate better code to
support trimming and NativeAOT scenarios.

We want to ship a copy of .NET 10 assemblies alongside their `net8.0-android`
counterparts.

To verify API compatibility between the `net8.0-android` and `net10.0-android`
assemblies you can run:

    dotnet tool install --global Microsoft.DotNet.ApiCompat.Tool
    Get-Item *.nupkg | ForEach-Object { Write-Output "apicompat package $_" ; & apicompat package $_.Name 2>&1 | ForEach-Object { "$_" } } > apidiff.txt

At first, we saw ~452 errors, but all appear to be due to changes toward
"hiding" internal Kotlin members in .NET 9:

* dotnet/java-interop@06214ff

General list of changes:

* Update `_PackageLevelCustomizations.cshtml`
* metadata + Additions cleanup for net10.0
* `nuget.config` from dotnet/android added
* <CheckEolWorkloads>false</CheckEolWorkloads> needed to work around some warnings and errors
* Create nuget-install.cake
* Provision `platforms/android-34`
* `Update Metadata.xml`

    obj/Controls.DeviceTests/Debug/net10.0-android/android/src/mono/androidx/recyclerview/widget/RecyclerView_ItemAnimator_ItemAnimatorListenerImplementor.java(8,57): javac error JAVAC0000:  error: ItemAnimatorListener is not public in ItemAnimator; cannot be accessed from outside package

* [build] remove `Install extra Android SDK packages`
* `$(AndroidManifestType)=GoogleV2`

    Warning : Dependency `platforms;android-36` should have been installed but could not be resolved. You can attempt to install it with...

* Restore BaseOnOffsetChangedListener metadata.xml

    javac.exe error JAVAC0000:  error: BaseOnOffsetChangedListener cannot be inherited with different arguments: <com.google.android.material.appbar.AppBarLayout> and <>

* Fix javac error for `ActivityChooserModel`

    Xamarin.Android.Javac.targets(161,5): error XAJVC0000: C:\a\_work\1\s\artifacts\obj\Benchmarks.Droid\Release\net10.0-android\android-arm64\android\src\mono\androidx\appcompat\widget\ActivityChooserModel_OnChooseActivityListenerImplementor.java:8: error: package androidx.appcompat.widget.ActivityChooserModel does not exist
Xamarin.Android.Javac.targets(161,5): error XAJVC0000: 		androidx.appcompat.widget.ActivityChooserModel.OnChooseActivityListener
Xamarin.Android.Javac.targets(161,5): error XAJVC0000: 		                                              ^

Co-authored-by: Peter Collins <pecolli@microsoft.com>
Co-authored-by: Jonathan Peppers <jonathan.peppers@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Changes Requested
Development

Successfully merging this pull request may close these issues.

3 participants