Skip to content

Conversation

@AbdeMohlbi
Copy link
Contributor

@AbdeMohlbi AbdeMohlbi commented Apr 28, 2025

this PR refactors the usage of :

  • project.directory.childDirectory('android').childDirectory('app').childFile('build.gradle') to
    project.android.appGradleFile
  • project.directory.childDirectory('android').childFile('build.gradle') to project.android.hostAppGradleFile
    to include the cases of usage of build.gradle.kts in new templates which may may produce confusing errors to new devs

Pre-launch Checklist

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

@flutter-dashboard
Copy link

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.

@github-actions github-actions bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Apr 28, 2025
.childDirectory('android')
.childDirectory('app')
.childFile('build.gradle');
.childFile('build.gradle.kts');
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 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.

Copy link
Contributor Author

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 ?

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 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.

@AbdeMohlbi AbdeMohlbi requested a review from reidbaker May 4, 2025 07:33
@flutter-dashboard
Copy link

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 package:flutter.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

Changes reported for pull request #167949 at sha 759f113

@flutter-dashboard flutter-dashboard bot added the will affect goldens Changes to golden files label May 5, 2025
@reidbaker reidbaker requested a review from a team May 12, 2025 15:00
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.

Sorry for the delay this feel off my queue.

@AbdeMohlbi
Copy link
Contributor Author

Sorry for the delay this feel off my queue.

Yeah i also need to change the PR description according to what really changed

@ash2moon
Copy link
Contributor

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 ash2moon self-requested a review May 13, 2025 17:33
@reidbaker
Copy link
Contributor

reidbaker commented May 13, 2025

@ash2moon I think the code is ready to land so please review.

@reidbaker
Copy link
Contributor

FWIW the description has already been updated

@gmackall gmackall changed the title replace buid.gradle with build.gradle.kts Replace hardcoded host and app level build.gradle paths with AndroidProject-level getters in gradle_errors.dart May 13, 2025
@AbdeMohlbi
Copy link
Contributor Author

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 yes it is ready thank u

Copy link
Member

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

@AbdeMohlbi
Copy link
Contributor Author

Thanks for this change! I've modified the title and description slightly to reflect the changes.

thank u and sorry for the delay

@gmackall gmackall added autosubmit Merge PR when tree becomes green via auto submit App and removed will affect goldens Changes to golden files labels May 13, 2025
@auto-submit auto-submit bot added this pull request to the merge queue May 13, 2025
Merged via the queue into flutter:master with commit 1d3a921 May 14, 2025
143 of 144 checks passed
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label May 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 14, 2025
…h `AndroidProject`-level getters in `gradle_errors.dart` (flutter/flutter#167949)
auto-submit bot pushed a commit to flutter/packages that referenced this pull request May 14, 2025
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
FMorschel pushed a commit to FMorschel/packages that referenced this pull request Jun 9, 2025
…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
Ortes pushed a commit to Ortes/packages that referenced this pull request Jun 25, 2025
…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
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 14, 2025
…h `AndroidProject`-level getters in `gradle_errors.dart` (flutter/flutter#167949)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 14, 2025
…h `AndroidProject`-level getters in `gradle_errors.dart` (flutter/flutter#167949)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 15, 2025
…h `AndroidProject`-level getters in `gradle_errors.dart` (flutter/flutter#167949)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 15, 2025
…h `AndroidProject`-level getters in `gradle_errors.dart` (flutter/flutter#167949)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 16, 2025
…h `AndroidProject`-level getters in `gradle_errors.dart` (flutter/flutter#167949)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants