Is there some kind of command like gradlew help <task>
that gives documentation about what exactly goes on in a particular task?
The gradle command will run Gradle on the gradle build script located in the same directory as the command prompt is located in. That means, that to run gradle on a specific gradle build script you must change directory in the command prompt into the directory where the build script is located.
Press ⌃⌃ (macOS), or Ctrl+Ctrl (Windows/Linux), type "gradle" followed by the gradle task name or names. We can, of course, run Gradle commands from the terminal window inside IntelliJ IDEA. Open this with ⌥F12 (macOS), or Alt+F12 (Windows/Linux).
To get an overview of all Gradle tasks in our project, we need to run the tasks task. Since Gradle 5.1, we can use the --group option followed by a group name. Gradle will then show all tasks belonging to the group and not the other tasks in the project.
There is
gradle help --task <taskname>
for exactly this now.
gradlew -dry-run <task>
will show what will be executed for the command. A shortcut version is:
gradlew -m <task>
Also
gradlew tasks
will show a list of all tasks and their dependencies.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With