Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I want to start a empty project with Gradle in Intellij IDEA but it seems not so convenient as Eclipse does.

What I did is File->New Project->Gradle. And a project shows up but it's not completed (it has no src folder for example).

And I add apply plugin 'idea' in the build.gradle. When I refer to the All tasks in IntelliJ IDEA. There are no idea,cleanIdea,ideaProject for me to set up a IntelliJ IDEA.

In Eclipse+Gradle plugin, just create a new gradle project and everything is ready.

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

Thanks

like image 857
macemers Avatar asked Dec 18 '13 03:12

macemers


People also ask

How do I create a Gradle project in IntelliJ?

Open your project in IntelliJ IDEA. In the Project tool window, right-click the name of your project and select New | File. In the dialog that opens enter build. gradle and click OK.

How do I create a Gradle Web project in IntelliJ?

Create a new Gradle Project with IntelliJ IDEAOn the welcome screen, click New Project. On the page that opens, let's specify our project's name (FizzBuzz) and the location. Let's select the Java option, which is what we need for our project and Gradle since we are creating a Gradle project.


1 Answers

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

New Gradle project wizard

New project will have those directories.

Gradle project structure

like image 131
kukido Avatar answered Oct 05 '22 11:10

kukido