gradle / gradle

Adaptable, fast automation for all
https://gradle.org
Apache License 2.0
16.96k stars 4.76k forks source link

Allow to use --version --help command line arguments via TAPI #14116

Open vladsoroka opened 4 years ago

vladsoroka commented 4 years ago

Please, add the support for --version and --help CLI arguments when Gradle is running via Tooling API.

It will improve user experience of Gradle usage from within IDE, e.g. for usecases when the IDE provides CLI-like interface for Gradle invocation, see Run a Gradle task in the Run Anything window

Initial user request can be found at https://youtrack.jetbrains.com/issue/IDEA-206114

alllex commented 4 months ago

Sorry for the late reply

This issue needs a decision from the team responsible for that area. They have been informed. Response time may vary.


This likely does not work due to the Tooling API expecting a model to be built or a task to be executed. When invoking --version it is the Gradle launcher that short-circuits and provides the info.

donat commented 1 month ago

This makes sense. For a smooth experience, the Tooling API should be aware if a LongRunningOperation has a --version or --help specified as an argument. In that case, a daemon invocation can be replaced with printing information on the console.