IntelliJ IDEA 2016.3 Help

Getting Started with Gradle

IntelliJ IDEA supports Gradle plugin version 1.8 and later and lets you take full advantage of the Gradle integration.

Creating Gradle Project

  1. Open Project Wizard, in the left-hand pane select Gradle.
  2. In the right-hand pane, specify the following options:
    • Project SDK - specify your project SDK(JDK).
      If the necessary JDK is already defined in IntelliJ IDEA, select it from the list. Otherwise, click New and select the installation folder of the desired JDK.
    • Additional Libraries and Frameworks - use this area to select an additional framework or a library for your Gradle project.
    Click Next.
  3. On the next page of the wizard, specify the following settings:
    • GroupId - specify groupId of the new project, which will be added to the build.gradle file.
    • ArtifactId - specify artifactId of the new project.
    • Version - specify version of the new project, which will be added to the build.gradle file.
    Click Next.
  4. On the next page of the wizard, specify the Gradle settings and click Next.
  5. Specify the name and location settings. For more information, see Project Name and Location or Module Name and Location. Click Finish.

IntelliJ IDEA creates a project with build.gradle file.

Importing Project from Gradle Model

  1. On the main menu, select File | Open, from the dialog that opens select build.gradle file and click OK.
    IntelliJ IDEA will import Gradle project even if the project was not opened or imported before.
    Alternatively, you can select File | New | Project from Existing Sources and from the dialog that opens select the Gradle project that you want to import.
  2. On the next page, select the model from which you want to import and click Next. If IntelliJ IDEA guessed what you are importing, then this page will be skipped.
  3. On the next page of the wizard, specify the Gradle project settings and global Gradle settings and click Finish.

If you import a multi-module project, IntelliJ IDEA displays the Project Data to Import dialog where you can select modules that you want to include in the project.


Exploring Gradle Project Structure

IntelliJ IDEA lets you view your Gradle project from the two following points:


You can make changes to the structure of the original Gradle project and to the resulting IntelliJ IDEA project, synchronize structures of the two projects, and explore differences.

Working with Gradle Tool Window

IntelliJ IDEA lets you perform the following actions in the Gradle tool window:

Last modified: 21 March 2017