Execute a Gradle task shortcut with IntelliJ IDEA

Sergio del Amo Mon, 30 Nov 2020 12:40:21 GMT

Tags: #gradle #intellijidea #automation

Most of my projects are Gradle Builds. For such projects, I use in IntelliJ IDEA. However, I delegate Build and Run and tests to Gradle. You can do that at Settings/Preferences | Build, Execution, Deployment |Build Tools | Gradle.

Thus, running tasks such as test, run, clean or build means executing a Gradle task. Because of that I have a shortcut to execute a Gradle task within IntelliJ IDEA:

Custom shortcut to execute a Gradle task in IntelliJ IDEA

Now when I type CONTROL + OPTION + COMMAND + G, I can run the any Gradle task:

Execute a Gradle task in IntelliJ IDEA