-
Notifications
You must be signed in to change notification settings - Fork 30.3k
Would like the ability to stop the gradle daemon from flutter tool #31089
Copy link
Copy link
Closed as not planned
Closed as not planned
Copy link
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityt: gradle"flutter build" and "flutter run" on Android"flutter build" and "flutter run" on Androidteam-toolOwned by Flutter Tool teamOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-toolTriaged by Flutter Tool teamTriaged by Flutter Tool team
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityt: gradle"flutter build" and "flutter run" on Android"flutter build" and "flutter run" on Androidteam-toolOwned by Flutter Tool teamOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-toolTriaged by Flutter Tool teamTriaged by Flutter Tool team
I regularly see gradle consuming nearly 700+ MB of RAM on my Linux system. I consider that to be a lot, especially when it's sitting there doing nothing.
The path to my gradle binary is convoluted (e.g.
~/.gradle/wrapper/dists/gradle-4.4-all/9br9xq1tocpiv8o6njlyu5op1/gradle-4.4/bin/gradle) and changes with gradle versions, so manually invokinggradle --stopis non-trivial.Additionally, the
fluttertool tries to abstract away build processes for Android (and iOS) apps, so many users might not even know what gradle is or why it's running. Sinceflutter runstarted the gradle daemon, it'd be nice if thefluttertool also provided some mechanism to stop it.I mentioned this in chat a few months ago. @dnfield considered disabling the gradle daemon unless the user opts in. I suggested making
flutter stop(possibly with a command-line option) stop the gradle daemon, but @Hixie didn't like that since it's not really whatstopis meant for. He suggested adding a command-line option toflutter cleanto do it.Some other ideas:
flutter runhasn't been used in some time. (But this would require some other daemon. Ideally gradle would provide the ability to do this itself.)