-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Reland (2): "Fix how Gradle resolves Android plugin" #142498
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
Reland (2): "Fix how Gradle resolves Android plugin" #142498
Conversation
67ba0c2 to
de0027c
Compare
…tter#137115)" (flutter#142464)" This reverts commit 995e3fa.
9140096 to
391b2a9
Compare
9e3e4c3 to
851fe0d
Compare
|
Tests fail as expected for enabled gradle daemon (before the fix): https://github.com/flutter/flutter/pull/142498/checks?check_run_id=21166626702 I reverted the revert with 309767c and added the tests with 851fe0d and added the fix with cddc017 |
…-resolve-android # Conflicts: # packages/flutter_tools/gradle/src/main/groovy/flutter.groovy
reidbaker
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good and I appreciate the effort you took to write a test that overrides the daemon options to catch a regression.
I am going to give this another pass after I have had some time to check it out and build locally but it looks good.
| if (pluginProject == null) { | ||
| // Plugin was not included in `settings.gradle`, but is listed in `.flutter-plugins`. | ||
| project.logger.error("Plugin project :${it.name} listed, but not found. Please fix your settings.gradle/settings.gradle.kts.") | ||
| } else if (doesSupportAndroidPlatform(pluginProject.projectDir.parentFile.path as String)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this line warn the caller that their project is misconfigured?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, an example is tested here
…-resolve-android # Conflicts: # packages/flutter_tools/gradle/src/main/groovy/flutter.groovy
|
@reidbaker small ping if there's time to finish the review :) |
|
I added a teammate who can give this a faster review. Sorry for the delay. |
The test added LGTM but can you give some context as to why cddc017 Also pinged @gmackall for a review if you can since you are more of a Gradle expert! |
|
Thank you :)
As stuartmorgan described in #141940 (comment) a Singleton persists across builds in gradle daemon. So the Singleton keyword is removed in cddc017. To not read the same file twice during the same build, some local variables were introduced ( Edit: I just noticed to be able optimize further in 530b0c3 |
camsim99
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fix for the cause of the revert LGTM! @bartekpacia or @gmackall for second review?
|
I would defer to someone who reviewed the original PR (I think the delta here between original (reland 1) and reland 2 is small) but can take a look if no one else is able to. It'll take me a bit though, as I'll have to review (original+reland delta) |
reidbaker
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your effort to reland this pr.
|
Thank you for reviewing! |
flutter/flutter@064c340...5129806 2024-02-20 [email protected] Roll Flutter Engine from 0abe2b9d6c7c to 781f308c6555 (1 revision) (flutter/flutter#143750) 2024-02-20 [email protected] Roll Flutter Engine from 92aad0d0fcee to 0abe2b9d6c7c (1 revision) (flutter/flutter#143745) 2024-02-20 [email protected] Roll Flutter Engine from 2335115f08d3 to 92aad0d0fcee (2 revisions) (flutter/flutter#143736) 2024-02-20 [email protected] Roll Flutter Engine from e96c18b6c5ee to 2335115f08d3 (1 revision) (flutter/flutter#143731) 2024-02-20 [email protected] Small fixes in TextEditingController docs (flutter/flutter#143717) 2024-02-19 [email protected] Roll Flutter Engine from b41494f009f4 to e96c18b6c5ee (1 revision) (flutter/flutter#143722) 2024-02-19 [email protected] Roll Flutter Engine from 714215d42e57 to b41494f009f4 (1 revision) (flutter/flutter#143713) 2024-02-19 [email protected] Reland (2): "Fix how Gradle resolves Android plugin" (flutter/flutter#142498) 2024-02-19 [email protected] Roll Packages from 0af905d to 84ff11d (1 revision) (flutter/flutter#143710) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Previous PR: #137115,
Revert: #142464
Fixes #141940
Closes #142487
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.