Skip to content

Conversation

@Gustl22
Copy link
Contributor

@Gustl22 Gustl22 commented Jan 30, 2024

Previous PR: #137115,
Revert: #142464
Fixes #141940
Closes #142487

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@github-actions github-actions bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Jan 30, 2024
@Gustl22 Gustl22 force-pushed the 137115-reland-2-fix-resolve-android branch from 67ba0c2 to de0027c Compare February 2, 2024 13:47
@Gustl22 Gustl22 force-pushed the 137115-reland-2-fix-resolve-android branch 3 times, most recently from 9140096 to 391b2a9 Compare February 2, 2024 18:39
@Gustl22 Gustl22 force-pushed the 137115-reland-2-fix-resolve-android branch from 9e3e4c3 to 851fe0d Compare February 2, 2024 19:07
@Gustl22
Copy link
Contributor Author

Gustl22 commented Feb 2, 2024

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

@Gustl22 Gustl22 marked this pull request as ready for review February 2, 2024 19:59
@Gustl22
Copy link
Contributor Author

Gustl22 commented Feb 2, 2024

CC @bartekpacia @camsim99 @reidbaker

…-resolve-android

# Conflicts:
#	packages/flutter_tools/gradle/src/main/groovy/flutter.groovy
Copy link
Contributor

@reidbaker reidbaker left a 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)) {
Copy link
Contributor

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?

Copy link
Contributor Author

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

Gustl22 added a commit to Gustl22/flutter that referenced this pull request Feb 5, 2024
@Gustl22 Gustl22 requested a review from reidbaker February 15, 2024 15:32
@Gustl22
Copy link
Contributor Author

Gustl22 commented Feb 15, 2024

@reidbaker small ping if there's time to finish the review :)

@reidbaker reidbaker requested a review from camsim99 February 15, 2024 16:39
@reidbaker
Copy link
Contributor

I added a teammate who can give this a faster review. Sorry for the delay.

@camsim99 camsim99 requested a review from gmackall February 15, 2024 17:02
@camsim99
Copy link
Contributor

camsim99 commented Feb 15, 2024

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

The test added LGTM but can you give some context as to why cddc017
fixes #141940?

Also pinged @gmackall for a review if you can since you are more of a Gradle expert!

@Gustl22
Copy link
Contributor Author

Gustl22 commented Feb 15, 2024

Thank you :)

The test added LGTM but can you give some context as to why cddc017
fixes #141940?

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 (pluginList and pluginDependencies) in flutter.groovy to ensure consistency and push performance.

Edit: I just noticed to be able optimize further in 530b0c3

Copy link
Contributor

@camsim99 camsim99 left a 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?

@gmackall
Copy link
Member

gmackall commented Feb 16, 2024

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)

Copy link
Contributor

@reidbaker reidbaker left a 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.

@reidbaker reidbaker added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 19, 2024
@auto-submit auto-submit bot merged commit 9620e3f into flutter:master Feb 19, 2024
@Gustl22
Copy link
Contributor Author

Gustl22 commented Feb 19, 2024

Thank you for reviewing!

@Gustl22 Gustl22 deleted the 137115-reland-2-fix-resolve-android branch February 19, 2024 19:53
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 20, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 20, 2024
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Feb 20, 2024
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
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

5 participants