How to create a gradle based Java project in Intellij IDEA 13.0.1 Community

I want to run an empty project with Gradle in Intellij IDEA, but this doesn’t seem as convenient as Eclipse.

What I did is File-> New Project β†’ Gradle. And the project appears, but it is not completed (for example, it does not have the src folder).

And add apply plugin 'idea' to build.gradle. When I reference all tasks in IntelliJ IDEA. For me there is no idea,cleanIdea,ideaProject to install IntelliJ IDEA.

In the Eclipse + Gradle plugin, just create a new Gradle project and you're done.

I want to know how to do this in Intellij IDEA.

thank

+82
java intellij-idea gradle
Dec 18 '13 at 3:01
source share
2 answers

When creating a new Gradle project, select "Create directories for empty content roots automatically."

New gradle project wizard

The new project will have these directories.

Gradle project structure

+171
Dec 18 '13 at 5:53 on
source share

The latest version of IntelliJ IDEA (2017.3) does not have the Create directories for empty content roots automatically option available in the New Project dialog box. But we can go to Preferences... β†’ Build, Execution, Deployment β†’ Gradle and check this parameter.

enter image description here

+4
Nov 03 '17 at 6:49
source share



All Articles