working with gradle projects - jetbrains with gradle projects intellij idea lets you link a gradle...

2
Working with Gradle Projects Working with Gradle Projects 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 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 to attach a gradle project. 3. In the file choose dialog box that opens, select the desired build.gradle file, and click OK 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 To open a linked Gradle project 1. In the Gradle tool window, right-click on the linked project. 2. From the context menu select . 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 To detach a linked Gradle project 1. In the Gradle tool window, under All tasks All tasks right-click on the linked project. 2. From the context menu, select . Alternatively, you can select the linked project and click on the Gradle tool bar. 3. In the Import Gradle Project 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 OK. The Gradle project is detached from the IntelliJ IDEA project and is not synchronized any more. To refresh a linked Gradle project To refresh a linked Gradle project 1. In the Gradle tool window, right-click on the linked project. 2. From the context menu, select . The IntelliJ IDEA synchronizes all linked projects. See Also See Also Reference: Gradle Tool Window Getting Started: Manipulating the Tool Windows Web Resources: Developer Community

Upload: doannga

Post on 18-Mar-2018

235 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Working with Gradle Projects - JetBrains with Gradle Projects IntelliJ IDEA lets you link a Gradle project to an existing IntelliJ IDEA project. When a project is created by importing

Working with Gradle ProjectsWorking with Gradle Projects

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 Gradletool window.

To link a Gradle projec t to IntelliJ IDEA projec tTo link a Gradle projec t to IntelliJ IDEA projec t

1. Open Gradle tool window. If an IntelliJ IDEA project is not linked to a Gradle project, thenthe Gradle tool window is disabled.IntelliJ IDEA displays a message with a link that quickly lets you import your gradle projectand 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 to attach a gradle project.

3. In the file choose dialog box that opens, select the desired build.gradle file, and click OKOK.Now as there is a linked Gradle project, the Gradle tool window shows the toolbar and treeview of Gradle entities.

To open a linked Gradle projec tTo open a linked Gradle projec t

1. In the Gradle tool window, right-click on the linked project.

2. From the context menu select .

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

To detach a linked Gradle projec tTo detach a linked Gradle projec t

1. In the Gradle tool window, under All tasksAll tasks right-click on the linked project.

2. From the context menu, select . Alternatively, you can select the linked project and click on the Gradle tool bar.

3. In the Import Gradle Projec tImport Gradle Projec t pop-up window, clear the check box if you do not want todelete the IntelliJ IDEA project as well.

4. Click OKOK.

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

To refresh a linked Gradle projec tTo refresh a linked Gradle projec t

1. In the Gradle tool window, right-click on the linked project.

2. From the context menu, select .

The IntelliJ IDEA synchronizes all linked projects.

See AlsoSee Also

Reference:

Gradle Tool Window

Getting Started:

Manipulating the Tool Windows

Web Resources:

Developer Community

Page 2: Working with Gradle Projects - JetBrains with Gradle Projects IntelliJ IDEA lets you link a Gradle project to an existing IntelliJ IDEA project. When a project is created by importing