IntelliJ IDEA 2016.3 Help

Gradle Tool Window

View | Tool Windows | Gradle

The Gradle tool window displays Gradle tasks, and all changes made to the underlying build.gradle file, or to the IntelliJ IDEA project structure.

If there is no linked Gradle project, the window is disabled. You need to reimport your Gradle project to enable the Gradle tool window.

In this section:

Gradle projects

ItemDescription
/help/img/idea/2016.3/viewMode.png Click this button to open the menu for configuring the current view and changing the tool window viewing modes.
The menu items are options that you can turn on or off. An active item contains a check mark on the left side of its name.
The available options in the menu are as follows:
  • Group Tasks - select this option if you want to group your tasks. For example, build tasks will be included into the build directory.
  • Show Toolbar - select this option to show the toolbar for your Gradle projects.
  • Pinned, Docked, Floating, Windowed, Split Mode
  • Group Tabs - deselect this option to see the views on separate tabs if more than one view is available in a tool window.
  • Move to - select this option to move the Gradle tool window to either top, left or right.
  • Resize - select this option to resize the Gradle tool window.
/help/img/idea/2016.3/hideSide.png Click this button to hide the tool window(Shift+Escape).
When used in combination with the Alt key, clicking this button hides all the tool windows attached to the same tool window bar.

Gradle Tasks

ItemDescription
Run ConfigurationsThis area contains a list of the last executed tasks and command types under which these tasks were executed.
TasksThis area contains a list of all available tasks.
DependenciesThis area contains a list project dependencies.

Toolbar

ItemDescription
/help/img/idea/2016.3/refresh.png Click this button to refresh all registered Gradle projects after changes have been made to a Gradle script.
/help/img/idea/2016.3/new.png Click this button to link a gradle project.
/help/img/idea/2016.3/delete.png Click this button to detach an external gradle project.
/help/img/idea/2016.3/icon_gradle.pngUse this button to execute a Gradle task. When you click this icon, the Run Gradle Task dialog opens. You can enter the name of the task that you want to execute. Note that IntelliJ IDEA supports a code completion.
img imgUse these buttons to expand or collapse all the nodes.
/help/img/idea/2016.3/gradle_data_to_import_icon.pngClick this button to import a module or a data to your gradle project via Project Data to Import dialog. It might be useful for the multi-module projects.
img Click this button to work with Gradle projects in the offline mode. It might be helpful when the network connection is slow or when you need to work offline.
img Click this button to configure the settings of the current Gradle project in the Gradle settings dialog box.

Context Menu

ItemDescription
/help/img/idea/2016.3/icon_gradle.png Select this option or use a shortcut to open build.gradle file.
/help/img/idea/2016.3/refresh.pngSelect this option to refresh external projects.
/help/img/idea/2016.3/delete.png Select this option to detach an external project.
Use auto-importSelect this option to enable the auto-import feature for your project.
Task ActivationSelect this option to add, edit or remove an activation phase for your task. It might be useful for working with the Gradle multi-module projects.

Context Menu Commands for Gradle Tasks

CommandDescription
Run <task>Choose this command to run the selected task with the task-specific run/debug configuration.
Debug <task>Choose this command to debug the selected task with the task-specific run/debug configuration.
Create <task>Choose this command to create run/debug configuration for the selected Gradle task.
Execute before Sync, Execute after SyncChoose these commands to set the respective flags for the selected task. In this case, Before Sync and After Sync comments appear next to the name of the node.
Execute before Build, Execute after BuildChoose these commands to set the respective flags for the selected task. In this case, Before Build and After Build comments appear next to the name of the node.
Execute before Rebuild, Execute after RebuildChoose these commands to set the respective flags for the selected task. In this case, Before Rebuild and After Rebuild comments appear next to the name of the node.
Assign ShortcutChoose this command to associate the selected phase with a keyboard shortcut. In this case, the comment with the shortcut appears next to the name of the node.

See Also

Last modified: 29 November 2016