Skip to content
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

Update gradle version for AndroidNative app from 7.6.1 to 8.10.2. #27859

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

LoopedBard3
Copy link
Member

Description of Change

Updates the gradle version for the AndroidNative app from 7.6.1 to 8.12.1. Once backported to net9.0 this will fix a performance pipeline issue that is being hit due to the gradle version being too old, specifically: BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 65 when gradle is running during the build of the app at src/Core/tests/Benchmarks.Droid/Benchmarks.Droid.csproj.

This also needs to be backported to the net9.0 branch.

@Copilot Copilot bot review requested due to automatic review settings February 17, 2025 20:32
@LoopedBard3 LoopedBard3 requested a review from a team as a code owner February 17, 2025 20:32

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 (2)
  • src/Core/AndroidNative/build.gradle: Language not supported
  • src/Core/AndroidNative/gradle/wrapper/gradle-wrapper.properties: Language not supported
Copy link
Contributor

Hey there @LoopedBard3! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Feb 17, 2025
@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

Copy link
Member

@PureWeen PureWeen left a comment

Choose a reason for hiding this comment

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

failing to build

/Users/builder/azdo/_work/3/s/.dotnet/packs/Microsoft.Android.Sdk.Darwin/35.0.39/tools/Microsoft.Android.Sdk.Bindings.Gradle.targets(83,5): error XAGRDL0000: > Namespace not specified. Specify a namespace in the module's build file: /Users/builder/azdo/_work/3/s/src/Core/AndroidNative/maui/build.gradle. See https://d.android.com/r/tools/upgrade-assistant/set-namespace for information about setting the namespace. [/Users/builder/azdo/_work/3/s/src/Core/src/Core.csproj::TargetFramework=net9.0-android35.0]
/Users/builder/azdo/_work/3/s/.dotnet/packs/Microsoft.Android.Sdk.Darwin/35.0.39/tools/Microsoft.Android.Sdk.Bindings.Gradle.targets(83,5): error XAGRDL0000: [/Users/builder/azdo/_work/3/s/src/Core/src/Core.csproj::TargetFramework=net9.0-android35.0]

It selected `gradle-8.10.2` but then also updated other files.

Let's give this a try.
@jonathanpeppers
Copy link
Member

I just opened this in Android Studio and let it do the "gradle upgrade".

It did different things, but let's see what happens.

@jonathanpeppers jonathanpeppers changed the title Update gradle version for AndroidNative app from 7.6.1 to 8.12.1. Update gradle version for AndroidNative app from 7.6.1 to 8.10.2. Feb 20, 2025
@jonathanpeppers
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

> A problem occurred configuring project ':maui'.
> Could not create an instance of type com.android.build.api.variant.impl.LibraryVariantBuilderImpl.
   > Namespace not specified. Specify a namespace in the module's build file: /Users/builder/azdo/_work/3/s/src/Core/AndroidNative/maui/build.gradle. See https://d.android.com/r/tools/upgrade-assistant/set-namespace for information about setting the namespace.
@jonathanpeppers
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

package="com.microsoft.maui" found in source AndroidManifest.xml
Setting the namespace via the package attribute in the source AndroidManifest.xml is no longer supported, and the value is ignored.
Recommendation: remove package="com.microsoft.maui" from the source AndroidManifest.xml:
TintTypedArray styledAttributes = TintTypedArray.obtainStyledAttributes(context, null, R.styleable.Toolbar, resId, 0);
@jonathanpeppers
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community ✨ Community Contribution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants