-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Replace hardcoded host and app level build.gradle paths with AndroidProject-level getters in gradle_errors.dart
#167949
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
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging. If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group. |
| .childDirectory('android') | ||
| .childDirectory('app') | ||
| .childFile('build.gradle'); | ||
| .childFile('build.gradle.kts'); |
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.
I think this breaks our support for build.gradle files.
My suggestion would be to replace these getters with project.android.appGradleFile then modify the implementation of appGradleFile to return build.gradle if it exists and if not check build.gradle.kts.
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.
seems fair , but wouldn't that break other tests that have some values hard coded some where ?
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.
I am hoping it wont break tests because if the old gradle file is there then it will be returned. This will require new tests for the appGradleFile method.
|
Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change). If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review. For more guidance, visit Writing a golden file test for Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
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.
Sorry for the delay this feel off my queue.
Yeah i also need to change the PR description according to what really changed |
|
Other than the PR description that needs to be updated, are there any further changes being made to this PR or is it ready to be reviewed? |
|
@ash2moon I think the code is ready to land so please review. |
|
FWIW the description has already been updated |
buid.gradle with build.gradle.ktsAndroidProject-level getters in gradle_errors.dart
@ash2moon yes it is ready thank u |
gmackall
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.
Thanks for this change! I've modified the title and description slightly to reflect the changes.
thank u and sorry for the delay |
…h `AndroidProject`-level getters in `gradle_errors.dart` (flutter/flutter#167949)
flutter/flutter@336a7ec...0b9f928 2025-05-14 [email protected] Fix Linux Impeller support broken by incorrect deletion of stencil buffer. (flutter/flutter#168668) 2025-05-14 [email protected] Roll Fuchsia Linux SDK from 6J81agNhuK4q255Jj... to fSvuEJgRmHxnewRJr... (flutter/flutter#168794) 2025-05-14 [email protected] Run `{Platform} flutter_packaging` builders on release candidates. (flutter/flutter#168762) 2025-05-14 [email protected] Remove `docs_deploy_beta`, fix `docs_publish`, add comments. (flutter/flutter#168754) 2025-05-14 [email protected] Add `titleAlignment` to `CheckboxListTile` and `RadioListTile` (flutter/flutter#168666) 2025-05-14 [email protected] Remove deprecated todo about caching (flutter/flutter#168534) 2025-05-13 [email protected] Replace hardcoded host and app level build.gradle paths with `AndroidProject`-level getters in `gradle_errors.dart` (flutter/flutter#167949) 2025-05-13 [email protected] Improve documentation for KeyedSubtree constructor (flutter/flutter#167198) 2025-05-13 [email protected] Wire up the system text scaler from `PlatformDispatcher` (flutter/flutter#159999) 2025-05-13 [email protected] Roll Dart SDK from 645d04a7a964 to b3520981e0f0 (3 revisions) (flutter/flutter#168721) 2025-05-13 [email protected] [a11y] Semanctis flag refactor step 3: framework part (flutter/flutter#167771) 2025-05-13 [email protected] Remove/replace the `team` label with `c: contributor-productivity`. (flutter/flutter#168702) 2025-05-13 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Clip search artifacts in CupertinoSliverNavigationBar searchable-to-searchable transitions (#168510)" (flutter/flutter#168775) 2025-05-13 [email protected] Use live region in error text input decorator for Android (flutter/flutter#165531) 2025-05-13 [email protected] [tool] Fix deprecated API calls within tool (flutter/flutter#168200) 2025-05-13 [email protected] Clip search artifacts in CupertinoSliverNavigationBar searchable-to-searchable transitions (flutter/flutter#168510) 2025-05-13 [email protected] Fixes hero not shown when remove pages without animation (flutter/flutter#168617) 2025-05-13 [email protected] [iOS] Do not hide selection handles when platform hides system context menu (flutter/flutter#168678) 2025-05-13 [email protected] Updated execution path to silently include --start-paused and updated tests (flutter/flutter#168400) 2025-05-13 [email protected] Roll Packages from 6a28ad9 to 2e166de (2 revisions) (flutter/flutter#168736) 2025-05-13 [email protected] [web] Fix multiline input selection in Chrome. (flutter/flutter#168217) 2025-05-13 [email protected] Call xcode_backend.dart from macos_assemble.sh (flutter/flutter#168108) 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] 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
…r#9251) flutter/flutter@336a7ec...0b9f928 2025-05-14 [email protected] Fix Linux Impeller support broken by incorrect deletion of stencil buffer. (flutter/flutter#168668) 2025-05-14 [email protected] Roll Fuchsia Linux SDK from 6J81agNhuK4q255Jj... to fSvuEJgRmHxnewRJr... (flutter/flutter#168794) 2025-05-14 [email protected] Run `{Platform} flutter_packaging` builders on release candidates. (flutter/flutter#168762) 2025-05-14 [email protected] Remove `docs_deploy_beta`, fix `docs_publish`, add comments. (flutter/flutter#168754) 2025-05-14 [email protected] Add `titleAlignment` to `CheckboxListTile` and `RadioListTile` (flutter/flutter#168666) 2025-05-14 [email protected] Remove deprecated todo about caching (flutter/flutter#168534) 2025-05-13 [email protected] Replace hardcoded host and app level build.gradle paths with `AndroidProject`-level getters in `gradle_errors.dart` (flutter/flutter#167949) 2025-05-13 [email protected] Improve documentation for KeyedSubtree constructor (flutter/flutter#167198) 2025-05-13 [email protected] Wire up the system text scaler from `PlatformDispatcher` (flutter/flutter#159999) 2025-05-13 [email protected] Roll Dart SDK from 645d04a7a964 to b3520981e0f0 (3 revisions) (flutter/flutter#168721) 2025-05-13 [email protected] [a11y] Semanctis flag refactor step 3: framework part (flutter/flutter#167771) 2025-05-13 [email protected] Remove/replace the `team` label with `c: contributor-productivity`. (flutter/flutter#168702) 2025-05-13 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Clip search artifacts in CupertinoSliverNavigationBar searchable-to-searchable transitions (#168510)" (flutter/flutter#168775) 2025-05-13 [email protected] Use live region in error text input decorator for Android (flutter/flutter#165531) 2025-05-13 [email protected] [tool] Fix deprecated API calls within tool (flutter/flutter#168200) 2025-05-13 [email protected] Clip search artifacts in CupertinoSliverNavigationBar searchable-to-searchable transitions (flutter/flutter#168510) 2025-05-13 [email protected] Fixes hero not shown when remove pages without animation (flutter/flutter#168617) 2025-05-13 [email protected] [iOS] Do not hide selection handles when platform hides system context menu (flutter/flutter#168678) 2025-05-13 [email protected] Updated execution path to silently include --start-paused and updated tests (flutter/flutter#168400) 2025-05-13 [email protected] Roll Packages from 6a28ad9 to 2e166de (2 revisions) (flutter/flutter#168736) 2025-05-13 [email protected] [web] Fix multiline input selection in Chrome. (flutter/flutter#168217) 2025-05-13 [email protected] Call xcode_backend.dart from macos_assemble.sh (flutter/flutter#168108) 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] 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
…r#9251) flutter/flutter@336a7ec...0b9f928 2025-05-14 [email protected] Fix Linux Impeller support broken by incorrect deletion of stencil buffer. (flutter/flutter#168668) 2025-05-14 [email protected] Roll Fuchsia Linux SDK from 6J81agNhuK4q255Jj... to fSvuEJgRmHxnewRJr... (flutter/flutter#168794) 2025-05-14 [email protected] Run `{Platform} flutter_packaging` builders on release candidates. (flutter/flutter#168762) 2025-05-14 [email protected] Remove `docs_deploy_beta`, fix `docs_publish`, add comments. (flutter/flutter#168754) 2025-05-14 [email protected] Add `titleAlignment` to `CheckboxListTile` and `RadioListTile` (flutter/flutter#168666) 2025-05-14 [email protected] Remove deprecated todo about caching (flutter/flutter#168534) 2025-05-13 [email protected] Replace hardcoded host and app level build.gradle paths with `AndroidProject`-level getters in `gradle_errors.dart` (flutter/flutter#167949) 2025-05-13 [email protected] Improve documentation for KeyedSubtree constructor (flutter/flutter#167198) 2025-05-13 [email protected] Wire up the system text scaler from `PlatformDispatcher` (flutter/flutter#159999) 2025-05-13 [email protected] Roll Dart SDK from 645d04a7a964 to b3520981e0f0 (3 revisions) (flutter/flutter#168721) 2025-05-13 [email protected] [a11y] Semanctis flag refactor step 3: framework part (flutter/flutter#167771) 2025-05-13 [email protected] Remove/replace the `team` label with `c: contributor-productivity`. (flutter/flutter#168702) 2025-05-13 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Clip search artifacts in CupertinoSliverNavigationBar searchable-to-searchable transitions (#168510)" (flutter/flutter#168775) 2025-05-13 [email protected] Use live region in error text input decorator for Android (flutter/flutter#165531) 2025-05-13 [email protected] [tool] Fix deprecated API calls within tool (flutter/flutter#168200) 2025-05-13 [email protected] Clip search artifacts in CupertinoSliverNavigationBar searchable-to-searchable transitions (flutter/flutter#168510) 2025-05-13 [email protected] Fixes hero not shown when remove pages without animation (flutter/flutter#168617) 2025-05-13 [email protected] [iOS] Do not hide selection handles when platform hides system context menu (flutter/flutter#168678) 2025-05-13 [email protected] Updated execution path to silently include --start-paused and updated tests (flutter/flutter#168400) 2025-05-13 [email protected] Roll Packages from 6a28ad9 to 2e166de (2 revisions) (flutter/flutter#168736) 2025-05-13 [email protected] [web] Fix multiline input selection in Chrome. (flutter/flutter#168217) 2025-05-13 [email protected] Call xcode_backend.dart from macos_assemble.sh (flutter/flutter#168108) 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] 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
…h `AndroidProject`-level getters in `gradle_errors.dart` (flutter/flutter#167949)
…h `AndroidProject`-level getters in `gradle_errors.dart` (flutter/flutter#167949)
…h `AndroidProject`-level getters in `gradle_errors.dart` (flutter/flutter#167949)
…h `AndroidProject`-level getters in `gradle_errors.dart` (flutter/flutter#167949)
…h `AndroidProject`-level getters in `gradle_errors.dart` (flutter/flutter#167949)
this PR refactors the usage of :
project.directory.childDirectory('android').childDirectory('app').childFile('build.gradle')toproject.android.appGradleFileproject.directory.childDirectory('android').childFile('build.gradle')toproject.android.hostAppGradleFileto include the cases of usage of
build.gradle.ktsin new templates which may may produce confusing errors to new devsPre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.