Running Gradle tasks
There are several convenient ways to run Gradle tasks from IntelliJ IDEA.
We saw earlier that we can navigate to a specific Gradle task in a specific Gradle project in the Gradle Tool Window, and we can double-click that task to get IntelliJ IDEA to run it.
We can also click on the elephant at the top of the Gradle tool window to run any Gradle task.
We can also use Run Anything with ⌃⌃ (macOS) / Ctrl+Ctrl (Windows/Linux) and search for gradle.
This can be a good way to run multiple gradle tasks, like you would from the command line. For example, running gradle clean build
to make sure everything is working as expected before committing changes.
We can, of course, run Gradle commands from the terminal window inside IntelliJ IDEA. Open this with ⌥F12 (macOS) / Alt+F12 (Windows/Linux).
Next, let's look at some tips for working with Gradle in IntelliJ IDEA.