IntelliJ IDEA 13.1 Web Help

IntelliJ IDEA lets you link a Gradle project to an existing IntelliJ IDEA project.

When a project is created by importing from Gradle model, this link is established automatically.

It is also possible to open, detach or refresh a linked Gradle project. This is done in the Gradle tool window.

To link a Gradle project to IntelliJ IDEA project
  1. Open Gradle tool window. If an IntelliJ IDEA project is not linked to a Gradle project, then the Gradle tool window is disabled.
    IntelliJ IDEA displays a message with a link that quickly lets you import your gradle project and enable the Gradle tool window.
    If the Gradle tool window is active then you have at least one Gradle project linked.
  2. In the Gradle tool window, click add to attach a gradle project.
  3. In the file choose dialog box that opens, select the desired build.gradle file, and click OK. Now as there is a linked Gradle project, the Gradle tool window shows the toolbar and tree view of Gradle entities.
To open a linked Gradle project
  1. In the Gradle tool window, right-click on the linked project.
  2. From the context menu select icon_gradle.

    IntelliJ IDEA navigates to the appropriate Gradle configuration file and the related build.gradle file opens in the editor.

To detach a linked Gradle project
  1. In the Gradle tool window, under All tasks right-click on the linked project.
  2. From the context menu, select delete. Alternatively, you can select the linked project and click delete on the Gradle tool bar.
  3. In the Import Gradle Project pop-up window, clear the check box if you do not want to delete the IntelliJ IDEA project as well.
  4. Click OK.

    The Gradle project is detached from the IntelliJ IDEA project and is not synchronized any more.

To refresh a linked Gradle project
  1. In the Gradle tool window, right-click on the linked project.
  2. From the context menu, select refresh.

    The IntelliJ IDEA synchronizes all linked projects.

See Also

Reference:

Getting Started:

Web Resources: