Import existing Gradle Git project into Eclipse

EclipseGradleImport

Eclipse Problem Overview


I've installed eclipse gradle plugin from here

http://kaczanowscy.pl/tomek/2010-03/gradle-ide-integration-eclipse-plugin

Is there a simple way to import into eclipse gradle project using gui, not doing stuff

described here: http://gradle.org/docs/current/userguide/eclipse_plugin.html

?

Eclipse Solutions


Solution 1 - Eclipse

Usually it is a simple as adding apply plugin: "eclipse" in your build.gradle and running

cd myProject/
gradle eclipse

and then refreshing your Eclipse project.

Occasionally you'll need to adjust build.gradle to generate Eclipse settings in some very specific way.

There is gradle support for Eclipse if you are using STS, but I'm not sure how good it is.

The only IDE I know that has decent native support for gradle is IntelliJ IDEA. It can do full import of gradle projects from GUI. There is a free Community Edition that you can try.

Solution 2 - Eclipse

There is a simplest and quick way to import a Gradle project into Eclipse. Just download the Gradle plugin for Eclipse from here.
https://marketplace.eclipse.org/content/gradle-integration-eclipse-0

And then from import select Gradle and your project would be imported. Then you have to click on Build Model to run it.


EDIT
Above link for Gradle plugin is no more valid. You can use the link as mentioned in the comment by @vikramvi

https://marketplace.eclipse.org/content/buildship-gradle-integration

Solution 3 - Eclipse

Add the following to your build.gradle

apply plugin: 'eclipse'

and browse to the project directory

gradle eclipse

Solution 4 - Eclipse

I have gone through this question earlier but did not found complete gui based solution.Today I got a GUI based solution provided by spring.

In short we need to do only that much:

1.Install plugin in eclipse from update site: site link

2.Import project as gradle and browse the .gradle file..that's it.

Complete documentation is here

Solution 5 - Eclipse

The simpliest way is to use sts gradle integration and import project

http://static.springsource.org/sts/docs/2.7.0.M1/reference/html/gradle/gradle-sts-tutorial.html

Don't forget to click "Build Model" button.

Solution 6 - Eclipse

You can do the following steps:

  1. Install the Buildship Gradle Integration using the Eclipse Marketplace. Simply type Buildship and click on search item. Now click on Install.

  2. Click on File -> Import ▸ Existing Gradle Project.

  3. Navigate to project root directory.

  4. Click on a finish to load your project.

Might be it will take some time for the first time to import Gradle project. So please be patient on it.

Solution 7 - Eclipse

Open eclipse and right click in the package explorer → import Select gradle Browse to the location where you checked out Click “Build Model” Select all the projects and hit finish

Solution 8 - Eclipse

Go to the GitHub page where they are maintain the official repository: https://github.com/spring-projects/eclipse-integration-gradle/blob/master/README.md

Copy the latest release link: http://dist.springsource.com/release/TOOLS/gradle (latest release)

Use this in Eclipse->Help->Install New Software..->Paste the link in "Work With"->press enter->select the names of the extension->click next and agree the license and follow the prompts.

After you have installed just import the project as a grade project and eclipse will take of the rest.

Solution 9 - Eclipse

I use another Eclipse plugin to import existing gradle projects.

You can install the Builship Gradle Gntegration 2.0 using the Eclipse Marketplace client.

Then you choose FIle ▸ Import ▸ Existing Gradle Project.

Finially, indicate your project root directory and click finish.

Solution 10 - Eclipse

As of the time of answering this, Eclipse Version: 2020-06 (4.16.0) has a File --> Import --> Gradle --> Existing gradle project menu option.You can use this option to import gradle project into Eclipse directly.

Solution 11 - Eclipse

Add the following to your build.gradle

apply plugin: 'eclipse'

and browse to the project directory

gradle eclipse

Once done, you could import the project from eclipse as simple Java Project.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionVyacheslavView Question on Stackoverflow
Solution 1 - EclipserodionView Answer on Stackoverflow
Solution 2 - EclipseHammad HassanView Answer on Stackoverflow
Solution 3 - EclipseRajkumar SinghView Answer on Stackoverflow
Solution 4 - EclipseVibhor BhardwajView Answer on Stackoverflow
Solution 5 - EclipseVyacheslavView Answer on Stackoverflow
Solution 6 - EclipseKabirul IslamView Answer on Stackoverflow
Solution 7 - EclipseMalkiat RandhawaView Answer on Stackoverflow
Solution 8 - EclipseSheece GardaziView Answer on Stackoverflow
Solution 9 - Eclipseshen keView Answer on Stackoverflow
Solution 10 - EclipseBinita BharatiView Answer on Stackoverflow
Solution 11 - EclipseLakhwinder SinghView Answer on Stackoverflow