Create Gradle Project in Eclipse

The following two tabs change content below.
Prasad Kharkar is a java enthusiast and always keen to explore and learn java technologies. He is SCJP,OCPWCD, OCEJPAD and aspires to be java architect.

Latest posts by Prasad Kharkar (see all)

This article will explain how to create gradle project in eclipse. As we’ve seen previously, gradle is a build tool which provide certain advantages over other build tools. We will further look into it and try to understand it better.

 

Create Gradle Project In Eclipse

I am using following to create gradle project in eclipse.

Installing Buildship plugin for gradle:

First, Open a blank eclipse workspace.

First of all, we will have to download plugins for integrating gradle with eclipse. Navigate to Help > Eclipse Marketplace. When dialog box opens, search for Buildship and you should be able to view available Buildship plugin for gradle

BuildShip Installation

After it is installed successfully, eclipse will ask for restart. Click OK.

Create Gradle Project In Eclipse:

Click File > New > Other. You will see a window opened where you can select the type of project you want to create. Here we will create gradle project in eclipse as shown below.New Gradle ProjectSelect Gradle Project as shown and click Next >  

You will go to a new dialog box which will ask you to specify name for it. Enter some name and click Finish.

New Gradle Project Name

After pressing Finish, you will see project structure created as below.

GradleProjectCreated

Note that this is a project structure defined for a gradle project.

  • src/main/java folder will contain all java source files
  • src/test/java folder will contain all java test cases
  • build.gradle file will have build script for project
  • settings.gradle file will contain necessary settings.

In further tutorials, we will see how we can create web applications just like this article explains how to create gradle project in eclipse

 

Share Button

Prasad Kharkar

Prasad Kharkar is a java enthusiast and always keen to explore and learn java technologies. He is SCJP,OCPWCD, OCEJPAD and aspires to be java architect.

Leave a Reply

Your email address will not be published. Required fields are marked *