Skip to content

Conversation

@AbdeMohlbi
Copy link
Contributor

@AbdeMohlbi AbdeMohlbi commented Oct 19, 2024

see #147122 for context
gradle docs for reference(scroll until this)

also this the lint :
Capture d’écran 2024-10-19 094417

Pre-launch Checklist

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 Oct 19, 2024
@AbdeMohlbi
Copy link
Contributor Author

AbdeMohlbi commented Oct 19, 2024

FWIW , there is problem with named because :
according to named docs: Locates a task by name, without triggering its creation or configuration, failing if there is no such object. same as findByName
but throws UnknownTaskException – If a task with the given name is not defined wich make it's usage with try and catch a must otherwise the script will fail
so if we consider this fix some comments must be added or let the findByName as it is

@AbdeMohlbi
Copy link
Contributor Author

FWIW , i highly recomand refactoring the usage of findByName into the same bloc so it became(if decided to not be removed):

def tasksToCheck = [
    "compress${variant.name.capitalize()}Assets",
    "bundle${variant.name.capitalize()}Aar",
    "bundle${variant.name.capitalize()}LocalLintAar"
]

tasksToCheck.each { taskName ->
    def task = project.tasks.findByName(taskName)
    if (task) {
        task.dependsOn(copyFlutterAssetsTask)
    }
}

@AbdeMohlbi AbdeMohlbi marked this pull request as ready for review October 19, 2024 16:46
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!).

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

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.

test-exempt: Building aars are tested in integration tests and this specific warning is a groovy/gradle lint that we do not have enabled in ci.

]
tasksToCheck.each { taskTocheck ->
try {
project.tasks.named(taskTocheck).configure { task ->
Copy link
Contributor

Choose a reason for hiding this comment

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

This is literally the same execution code since before we would cause a configuration so from a safety standpoint I like it.

@gmackall what are your thoughts about removing the configure and just calling dependsOn since configuration isnt needed to do depends on according to this documentation.

Copy link
Member

Choose a reason for hiding this comment

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

If we don't separately need the configuration here I support it.

I don't actually know if it is doing something important at this point, but if nothing breaks when removing it then that is fine with me

Copy link
Contributor

Choose a reason for hiding this comment

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

@AbdeMohlbi do you have a preference between landing this pr as is and modifying the pr to no longer do the configuration, the downside to changing it now is that a revert reverts both parts. The downside to doing that is a new pr is that you will have to write another pr.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

if i remember correctly i tried deleting it and some tests broke , not sure tho i'm having headache from this file lately

@AbdeMohlbi
Copy link
Contributor Author

i did an other pr that does the same thing with another isntance that i haven't seen at the start

@AbdeMohlbi
Copy link
Contributor Author

AbdeMohlbi commented Oct 21, 2024

one more thing out of context of this pr is that where do i find an AndroidManifest.xml file of a flutter app that contains deep links , i'm trying to land this and IMO something is wrong , when trying to see what tags the script does found i got nothing ?? (i tried flutter deep links)

@reidbaker
Copy link
Contributor

one more thing out of context of this pr is that where do i find an AndroidManifest.xml file of a flutter app that contains deep linkes , i'm trying to land this and IMO something is wrong , when trying to see what tags it found i got nothing ?? (i tried flutter deep links)

Thank you and let's land this as is.

@reidbaker reidbaker added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 21, 2024
@auto-submit auto-submit bot merged commit fba8c57 into flutter:master Oct 21, 2024
auto-submit bot pushed a commit that referenced this pull request Oct 25, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 12, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 13, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 13, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 6, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 7, 2025
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.

3 participants