Repository navigation
fix(android): replace Groovy space-assignment in plugin build.gradle files - #18837
Conversation
…files Gradle 9 deprecates property space-assignment syntax and Gradle 10 removes it. Use explicit `prop = value` for group, version, namespace, and buildConfig so Android builds stay compatible. Fixes #18832
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. |
A couple of example and test app build.gradle files still used Groovy space-assignment for minSdkVersion and coreLibraryDesugaringEnabled. Switch those to `=` to match the other examples.
Description
Gradle 9 deprecates Groovy space-assignment syntax for properties (
prop value/prop(value)), and Gradle 10 is scheduled to remove it. FlutterFire Android pluginbuild.gradlefiles still used that form forgroup,version,namespace, and (in some plugins)buildConfig, which produces deprecation warnings on every consumer build under Gradle 9 and will break configuration under Gradle 10.This PR switches those assignments to explicit
prop = valueacross all Android plugins. The same leftover form in example and test apps (minSdkVersionandcoreLibraryDesugaringEnabled) is updated to match. The change is compatible with Gradle 8.x.Remaining plugin lines such as
compileSdkVersion/minSdkVersion project.ext.minSdkare AGP methods, not the Gradle property syntax this issue covers, and are left unchanged.Related Issues
Fixes #18832
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]).This will ensure a smooth and quick review process. Updating the
pubspec.yamland changelogs is not required.///).melos run analyze) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?
Test plan
android/build.gradlefiles no longer use space-assignment forgroup,version,namespace, orbuildConfig.minSdkVersion Math.max(...),coreLibraryDesugaringEnabled true) now use=../gradlew help --warning-mode alland confirm the space-assignment deprecation no longer points at FlutterFire pluginbuild.gradlelines.