Skip to content

Conversation

@chunhtai
Copy link
Contributor

#120408

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.

@flutter-dashboard flutter-dashboard bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Mar 20, 2023
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not sure if on this function is the right place but please add some documentation for what "getBuildOptions" is for an who should use it.

Copy link
Contributor

Choose a reason for hiding this comment

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

It might be more obvious if I had worked in the tools but for my own education can you tell me a bit a about the responsibilities of project.dart and vmservice.dart?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am also new to this @christopherfujino may know more. But this is what I assuming when I read the code.
AndroidProject class is responsible for all interactions from/to android sub project in the flutter folder. The vmservice is to register callback to the VMService so that whichever other dart running instances (in this case, Devtool) that connect to the VMService can call into the callbacks to get what it needs

@chunhtai chunhtai requested a review from reidbaker March 24, 2023 23:20
@chunhtai chunhtai force-pushed the issues/120408 branch 2 times, most recently from 72eb56a to 5f5dbd7 Compare March 27, 2023 19:46
@chunhtai
Copy link
Contributor Author

A friendly bump

@reidbaker
Copy link
Contributor

Added @andrewkolos as the voice of the tools team since @christopherfujino is on vacation this week.

Copy link
Member

@gnprice gnprice left a comment

Choose a reason for hiding this comment

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

DBC

@christopherfujino
Copy link
Contributor

@andrewkolos can you take a look at this one?

@christopherfujino christopherfujino removed their request for review April 7, 2023 20:13
@andrewkolos
Copy link
Contributor

I went ahead and resolved a merge conflict this had with #124233.

FYI the newly added test (android_gradle_print_build_variants_test.dart) is failing.

@chunhtai chunhtai force-pushed the issues/120408 branch 2 times, most recently from ae8000f to 6049637 Compare April 14, 2023 17:43
@reidbaker
Copy link
Contributor

FYI I am waiting on a ping to re-review this.

@chunhtai chunhtai requested review from gnprice and reidbaker April 14, 2023 17:55
@chunhtai
Copy link
Contributor Author

This is ready for another look

Copy link
Contributor

Choose a reason for hiding this comment

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

Consider using and exposing _javaHomeEnvironmentVariable.

Copy link
Contributor

Choose a reason for hiding this comment

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

Consider adding a dart doc

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this could still benefit from a dart doc.

Copy link
Contributor

Choose a reason for hiding this comment

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

If vmService.registerService('flutterGetAndroidBuildVariants' and vmService.registerServiceCallback('flutterGetAndroidBuildVariants', need the same flutterGetAndroidBuildVariants. Consider using a constant.

Copy link
Contributor

Choose a reason for hiding this comment

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

Should you add tests for any of the unhappy paths to make sure your error handling behaves consistently across refactors?

Copy link
Contributor

Choose a reason for hiding this comment

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

Consider using a raw string here. I think what you have is more readable but a raw string is easier to maintain.

@reidbaker
Copy link
Contributor

Please still get a review from someone on the tools team to check the non android/gradle specific parts.

Copy link
Contributor

@andrewkolos andrewkolos left a comment

Choose a reason for hiding this comment

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

LGTM

@chunhtai chunhtai added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 17, 2023
@auto-submit
Copy link
Contributor

auto-submit bot commented Apr 17, 2023

auto label is removed for flutter/flutter, pr: 123034, due to - The status or check suite Google testing has failed. Please fix the issues identified (or deflake) before re-applying this label.

@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Apr 17, 2023
@chunhtai
Copy link
Contributor Author

change requires g3fix cl/525157717

@chunhtai chunhtai added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 18, 2023
@auto-submit auto-submit bot merged commit 55502fc into flutter:master Apr 18, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 19, 2023
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Apr 19, 2023
flutter/flutter@42fb0b2...3476b96

2023-04-19 [email protected] Update helper message for `--suppress-analytics` (flutter/flutter#124810)
2023-04-19 [email protected] Roll Flutter Engine from 8b7cdb02f7f3 to 609f9d536494 (1 revision) (flutter/flutter#125097)
2023-04-19 [email protected] Roll Flutter Engine from 099ed6c62d04 to 8b7cdb02f7f3 (6 revisions) (flutter/flutter#125094)
2023-04-19 [email protected] Roll Flutter Engine from 5fcc7b719029 to 099ed6c62d04 (3 revisions) (flutter/flutter#125078)
2023-04-19 [email protected] Disableable ContextMenuButtonItems (flutter/flutter#124253)
2023-04-18 [email protected] Adaptive alert dialog (flutter/flutter#124336)
2023-04-18 [email protected] Roll Flutter Engine from 6d263ea56a62 to 5fcc7b719029 (4 revisions) (flutter/flutter#125069)
2023-04-18 [email protected] Remove package:js/dart:js_interop conflicts (flutter/flutter#124879)
2023-04-18 [email protected] Remove double.fromEnvironment from dart-define doc (flutter/flutter#124102)
2023-04-18 [email protected] Update to add Kim Jiun to `AUTHORS` (flutter/flutter#125026)
2023-04-18 [email protected] Add controller argument to SubmenuButton (flutter/flutter#125000)
2023-04-18 [email protected] Roll Flutter Engine from 879308a52228 to 6d263ea56a62 (1 revision) (flutter/flutter#125060)
2023-04-18 [email protected] Limit the number of Material spell check suggestions to 3 (flutter/flutter#124899)
2023-04-18 [email protected] Remove impeller testowners (flutter/flutter#125056)
2023-04-18 [email protected] [web] - Clean up skipped tests (flutter/flutter#124981)
2023-04-18 [email protected] Roll Flutter Engine from 72b68622fffa to 879308a52228 (1 revision) (flutter/flutter#125057)
2023-04-18 [email protected] Remove unused getRootRenderObject and getSelectedRenderObject service extensions (flutter/flutter#124805)
2023-04-18 [email protected] l10n.yaml's nullable-getter option should default to true (flutter/flutter#124353)
2023-04-18 [email protected] Roll Flutter Engine from 55bb065c607b to 72b68622fffa (1 revision) (flutter/flutter#125053)
2023-04-18 [email protected] Add vmservice for android build options (flutter/flutter#123034)

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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
gmackall pushed a commit to gmackall/flutter that referenced this pull request May 4, 2023
gmackall pushed a commit to gmackall/flutter that referenced this pull request May 5, 2023
XilaiZhang pushed a commit that referenced this pull request May 15, 2023
…d Studio bundled Java version is detected (and 3 others) (#126093)

This is a cherry pick of the following four PRs (the first one depends
on changes made in the latter three).
1. #125836
2. #124771
3. #123034
4. #123644

For the first PR, 
Original issue: #122376
Cherry-pick issue: #125693

*If you had to change anything in the [flutter/tests] repo, include a
link to the migration guide as per the [breaking change policy].*

## Pre-launch Checklist

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

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

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat

---------

Co-authored-by: Reid Baker <[email protected]>
Co-authored-by: Mitchell Goodwin <[email protected]>
Co-authored-by: Greg Spencer <[email protected]>
Co-authored-by: Victoria Ashworth <[email protected]>
Co-authored-by: Jackson Gardner <[email protected]>
Co-authored-by: Rydmike <[email protected]>
Co-authored-by: keyonghan <[email protected]>
Co-authored-by: chunhtai <[email protected]>
Co-authored-by: Taha Tesser <[email protected]>
Co-authored-by: Ben Konyi <[email protected]>
Co-authored-by: engine-flutter-autoroll <[email protected]>
Co-authored-by: hellohuanlin <[email protected]>
Co-authored-by: Danny Tuppeny <[email protected]>
Co-authored-by: Chris Bracken <[email protected]>
Co-authored-by: Kate Lovett <[email protected]>
Co-authored-by: Michael Goderbauer <[email protected]>
Co-authored-by: Elias Yishak <[email protected]>
Co-authored-by: Christopher Fujino <[email protected]>
Co-authored-by: Andrew Kolos <[email protected]>
nploi pushed a commit to nploi/packages that referenced this pull request Jul 16, 2023
flutter/flutter@42fb0b2...3476b96

2023-04-19 [email protected] Update helper message for `--suppress-analytics` (flutter/flutter#124810)
2023-04-19 [email protected] Roll Flutter Engine from 8b7cdb02f7f3 to 609f9d536494 (1 revision) (flutter/flutter#125097)
2023-04-19 [email protected] Roll Flutter Engine from 099ed6c62d04 to 8b7cdb02f7f3 (6 revisions) (flutter/flutter#125094)
2023-04-19 [email protected] Roll Flutter Engine from 5fcc7b719029 to 099ed6c62d04 (3 revisions) (flutter/flutter#125078)
2023-04-19 [email protected] Disableable ContextMenuButtonItems (flutter/flutter#124253)
2023-04-18 [email protected] Adaptive alert dialog (flutter/flutter#124336)
2023-04-18 [email protected] Roll Flutter Engine from 6d263ea56a62 to 5fcc7b719029 (4 revisions) (flutter/flutter#125069)
2023-04-18 [email protected] Remove package:js/dart:js_interop conflicts (flutter/flutter#124879)
2023-04-18 [email protected] Remove double.fromEnvironment from dart-define doc (flutter/flutter#124102)
2023-04-18 [email protected] Update to add Kim Jiun to `AUTHORS` (flutter/flutter#125026)
2023-04-18 [email protected] Add controller argument to SubmenuButton (flutter/flutter#125000)
2023-04-18 [email protected] Roll Flutter Engine from 879308a52228 to 6d263ea56a62 (1 revision) (flutter/flutter#125060)
2023-04-18 [email protected] Limit the number of Material spell check suggestions to 3 (flutter/flutter#124899)
2023-04-18 [email protected] Remove impeller testowners (flutter/flutter#125056)
2023-04-18 [email protected] [web] - Clean up skipped tests (flutter/flutter#124981)
2023-04-18 [email protected] Roll Flutter Engine from 72b68622fffa to 879308a52228 (1 revision) (flutter/flutter#125057)
2023-04-18 [email protected] Remove unused getRootRenderObject and getSelectedRenderObject service extensions (flutter/flutter#124805)
2023-04-18 [email protected] l10n.yaml's nullable-getter option should default to true (flutter/flutter#124353)
2023-04-18 [email protected] Roll Flutter Engine from 55bb065c607b to 72b68622fffa (1 revision) (flutter/flutter#125053)
2023-04-18 [email protected] Add vmservice for android build options (flutter/flutter#123034)

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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
FlutterSu pushed a commit to flutter-rosita/flutter-rosita that referenced this pull request Sep 14, 2023
…d Studio bundled Java version is detected (and 3 others) (flutter#126093)

This is a cherry pick of the following four PRs (the first one depends
on changes made in the latter three).
1. flutter#125836
2. flutter#124771
3. flutter#123034
4. flutter#123644

For the first PR,
Original issue: flutter#122376
Cherry-pick issue: flutter#125693

*If you had to change anything in the [flutter/tests] repo, include a
link to the migration guide as per the [breaking change policy].*

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

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

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat

---------

Co-authored-by: Reid Baker <[email protected]>
Co-authored-by: Mitchell Goodwin <[email protected]>
Co-authored-by: Greg Spencer <[email protected]>
Co-authored-by: Victoria Ashworth <[email protected]>
Co-authored-by: Jackson Gardner <[email protected]>
Co-authored-by: Rydmike <[email protected]>
Co-authored-by: keyonghan <[email protected]>
Co-authored-by: chunhtai <[email protected]>
Co-authored-by: Taha Tesser <[email protected]>
Co-authored-by: Ben Konyi <[email protected]>
Co-authored-by: engine-flutter-autoroll <[email protected]>
Co-authored-by: hellohuanlin <[email protected]>
Co-authored-by: Danny Tuppeny <[email protected]>
Co-authored-by: Chris Bracken <[email protected]>
Co-authored-by: Kate Lovett <[email protected]>
Co-authored-by: Michael Goderbauer <[email protected]>
Co-authored-by: Elias Yishak <[email protected]>
Co-authored-by: Christopher Fujino <[email protected]>
Co-authored-by: Andrew Kolos <[email protected]>
FlutterSu pushed a commit to flutter-rosita/flutter-rosita that referenced this pull request Dec 27, 2023
…d Studio bundled Java version is detected (and 3 others) (flutter#126093)

This is a cherry pick of the following four PRs (the first one depends
on changes made in the latter three).
1. flutter#125836
2. flutter#124771
3. flutter#123034
4. flutter#123644

For the first PR,
Original issue: flutter#122376
Cherry-pick issue: flutter#125693

*If you had to change anything in the [flutter/tests] repo, include a
link to the migration guide as per the [breaking change policy].*

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

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

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat

---------

Co-authored-by: Reid Baker <[email protected]>
Co-authored-by: Mitchell Goodwin <[email protected]>
Co-authored-by: Greg Spencer <[email protected]>
Co-authored-by: Victoria Ashworth <[email protected]>
Co-authored-by: Jackson Gardner <[email protected]>
Co-authored-by: Rydmike <[email protected]>
Co-authored-by: keyonghan <[email protected]>
Co-authored-by: chunhtai <[email protected]>
Co-authored-by: Taha Tesser <[email protected]>
Co-authored-by: Ben Konyi <[email protected]>
Co-authored-by: engine-flutter-autoroll <[email protected]>
Co-authored-by: hellohuanlin <[email protected]>
Co-authored-by: Danny Tuppeny <[email protected]>
Co-authored-by: Chris Bracken <[email protected]>
Co-authored-by: Kate Lovett <[email protected]>
Co-authored-by: Michael Goderbauer <[email protected]>
Co-authored-by: Elias Yishak <[email protected]>
Co-authored-by: Christopher Fujino <[email protected]>
Co-authored-by: Andrew Kolos <[email protected]>
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

Development

Successfully merging this pull request may close these issues.

5 participants