IntelliJ IDEA 14.1.1 Help

Working with Gradle Tasks in Gradle Tool Window

Gradle tool window lets you create a run/debug configuration for the selected Gradle task. You can also execute and debug different Gradle tasks.

To create run/debug configuration for Gradle tasks in Gradle Tool Window

  1. In the Gradle tool window, in the Tasks area, double-click on the Gradle project.

    The list of tasks opens.

  2. In the list of tasks, select a task for which you want to create a run/debug configuration, right-click on it and from the context menu select Create option.

    The Create Run/Debug Configuration dialog opens.

  3. In the Create Run/Debug Configuration dialog, specify the necessary information and click OK.

To debug Gradle tasks in Gradle Tool Window

Tasks available for debugging via Gradle tool window are the ones that implement org.gradle.process.JavaForkOptions interface. For example, test or run. For debugging Gradle script tasks themselves, use a Groovy run/debug configuration that appears in the context menu when you right-click on the script task in the editor.

  1. In the Gradle tool window, in Tasks area, double-click on the Gradle project.

    The list of tasks opens.

  2. In the list of tasks, select a task which you want to debug, right-click on it and from the context menu select Debug option.

    The debugging process is started and the task is added to the list of recent tasks located under the Run Configurations node.

To execute Gradle tasks in Gradle Tool Window

  1. In the Gradle tool window, in Tasks area, double-click on the Gradle project.

    The list of tasks opens.

  2. In the list of tasks, select the task that you want to execute and double-click on it. Alternatively, right-click on the selected task and from the context menu select Run option.

    The task is executed and is added to the list of recent tasks.

See Also

Last modified: 6 April 2015