Skip to content

Conversation

@jonathanpeppers
Copy link
Member

@jonathanpeppers jonathanpeppers commented Jun 18, 2025

This mainly updates Xamarin.AndroidX.Navigation.* packages to a new 2.9.0 version from Google.

Going a step further from the recent update in adfe0ec, I continued to refactor and remove MSBuild properties like
$(_XamarinAndroidGlideVersion) that dependabot won't be able to update.

Removed:

  • $(_XamarinAndroidGlideVersion)
  • $(_XamarinAndroidXSecurityVersion)
  • $(_XamarinGoogleCryptoTinkAndroidVersion)
  • $(XamarinGooglePlayServicesMaps)

The versions of these packages are now tracked in a single location, AndroidX.targets, that dependabot can update. Example here.

@jonathanpeppers jonathanpeppers force-pushed the dev/peppers/android-libraries-20250618 branch from 038034b to ed990e6 Compare July 10, 2025 16:45
@PureWeen PureWeen added platform/android area-infrastructure CI, Maestro / Coherency, upstream dependencies/versions labels Aug 7, 2025
This is WIP, it currently errors with:

    src\Core\src\Handlers\Toolbar\ToolbarHandler.Android.cs(101,21): error CS7069: Reference to type 'ISavedStateRegistryOwner' claims it is defined in 'Xamarin.AndroidX.SavedState', but it could not be found
    src\Core\src\Platform\Android\MauiAppCompatActivity.cs(43,6): error CS7069: Reference to type 'ISavedStateRegistryOwner' claims it is defined in 'Xamarin.AndroidX.SavedState', but it could not be found
    src\Core\src\Platform\Android\Navigation\StackNavigationManager.cs(468,9): error CS7069: Reference to type 'ISavedStateRegistryOwner' claims it is defined in 'Xamarin.AndroidX.SavedState', but it could not be found
    src\Core\src\Platform\Android\Navigation\StackNavigationManager.cs(468,9): error CS8602: Dereference of a possibly null reference.
    src\Core\src\Platform\Android\ContextExtensions.cs(467,9): error CS7069: Reference to type 'ISavedStateRegistryOwner' claims it is defined in 'Xamarin.AndroidX.SavedState', but it could not be found

This mainly updates Xamarin.AndroidX.Navigation.* packages to a new
2.9.0 version from Google.

Going a step further from the recent update in adfe0ec, I continued
to refactor and remove MSBuild properties like
`$(_XamarinAndroidGlideVersion)` that dependabot won't be able to
update.

Removed:

* `$(_XamarinAndroidGlideVersion)`
* `$(_XamarinAndroidXSecurityVersion)`
* `$(_XamarinGoogleCryptoTinkAndroidVersion)`
* `$(XamarinGooglePlayServicesMaps)`

The versions of these packages are now tracked in a single location,
`AndroidX.targets`, that dependabot can update. Example [here][0].

[0]: jonathanpeppers/boots@c190ed4
@jonathanpeppers jonathanpeppers force-pushed the dev/peppers/android-libraries-20250618 branch from ed990e6 to 0be3ced Compare August 13, 2025 16:36
@jonathanpeppers jonathanpeppers marked this pull request as ready for review August 13, 2025 18:37
Copilot AI review requested due to automatic review settings August 13, 2025 18:37
@jonathanpeppers jonathanpeppers requested a review from a team as a code owner August 13, 2025 18:37
Copy link
Contributor

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.

Pull Request Overview

This PR updates Android ecosystem packages to support .NET 10.0, consolidating package version management in a single location to enable better dependency management. The changes primarily focus on updating Xamarin.AndroidX.Navigation.* packages to version 2.9.0 and removing MSBuild properties that dependabot cannot update.

  • Consolidates AndroidX package version management in AndroidX.targets for better dependency tracking
  • Updates multiple AndroidX Lifecycle and Navigation packages to newer versions
  • Removes MSBuild variables like $(_XamarinAndroidGlideVersion) in favor of centralized version management

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/Workload/Microsoft.Maui.Sdk/Microsoft.Maui.Sdk.csproj Removes obsolete MSBuild property replacements for Android packages
src/Core/tests/Benchmarks.Droid/Benchmarks.Droid.csproj Updates Glide package reference to use centralized versioning
src/Core/src/Core.csproj Adds new AndroidX Lifecycle packages and updates Glide reference
src/Core/maps/src/Maps.csproj Updates Google Play Services Maps to use centralized versioning
src/Controls/Foldable/src/Controls.Foldable.csproj Adds new AndroidX Lifecycle packages for foldable support
src/Compatibility/Maps/src/Android/Compatibility.Maps.Android.csproj Adds AndroidX Lifecycle packages and updates Maps reference
src/Compatibility/Android.AppLinks/src/Compatibility.Android.AppLinks.csproj Adds AndroidX Lifecycle packages for app links functionality
eng/Versions.props Removes MSBuild variables that are now managed centrally
eng/NuGetVersions.targets Removes package version overrides that are now in AndroidX.targets
eng/AndroidX.targets Centralizes all AndroidX package versions and adds new dependencies

<PackageReference Include="Xamarin.AndroidX.Lifecycle.Runtime.Ktx" />
<PackageReference Include="Xamarin.AndroidX.Lifecycle.ViewModel.Ktx" />
<PackageReference Include="Xamarin.AndroidX.Lifecycle.ViewModelSavedState" />
<PackageReference Include="Xamarin.AndroidX.SavedState" />
Copy link

Copilot AI Aug 13, 2025

Choose a reason for hiding this comment

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

Adding Xamarin.AndroidX.SavedState package is potentially a breaking change as it introduces new dependencies to the public API. Please alert reviewers that this may be a breaking change and ensure it's not included in minor versions or service releases.

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

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

Xamarin.AndroidX.SavedState was already brought in, but we have to list it to get the fix:

@PureWeen PureWeen added this to the .NET 10.0-rc1 milestone Aug 13, 2025
@PureWeen PureWeen added the p/0 Current heighest priority issues that we are targeting for a release. label Aug 13, 2025
@PureWeen PureWeen moved this from Todo to Ready To Review in MAUI SDK Ongoing Aug 15, 2025
@github-project-automation github-project-automation bot moved this from Ready To Review to Approved in MAUI SDK Ongoing Aug 18, 2025
@rmarinho
Copy link
Member

I see a test failing with a little difference.. Not sure if it's related with these changes or not.

RefreshIconDisappearsWhenUserCancelsRefreshByScrollingBackUp-diff

@jonathanpeppers
Copy link
Member Author

@rmarinho who knows about this test?

The only thing I can think of is AndroidX.SwipeRefreshLayout is probably updated:

image

@rmarinho
Copy link
Member

Talked with @PureWeen and this seems to be a flaky test.

@rmarinho rmarinho merged commit 6ddecf5 into net10.0 Aug 19, 2025
128 of 130 checks passed
@rmarinho rmarinho deleted the dev/peppers/android-libraries-20250618 branch August 19, 2025 02:03
@github-project-automation github-project-automation bot moved this from Approved to Done in MAUI SDK Ongoing Aug 19, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Sep 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-infrastructure CI, Maestro / Coherency, upstream dependencies/versions p/0 Current heighest priority issues that we are targeting for a release. platform/android

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants