Import existing Gradle Git project into Eclipse

2019-01-13 00:41发布

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

?

10条回答
Animai°情兽
2楼-- · 2019-01-13 01:14

Add the following to your build.gradle

apply plugin: 'eclipse'

and browse to the project directory

gradle eclipse
查看更多
看我几分像从前
3楼-- · 2019-01-13 01:17

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.

查看更多
干净又极端
4楼-- · 2019-01-13 01:18

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

查看更多
smile是对你的礼貌
5楼-- · 2019-01-13 01:18

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

查看更多
登录 后发表回答