How to import Gradle project into eclipse

How to Integrate Eclipse with Gradle project?
1.download groovy eclipse plugin ---3.7 (Indigo) http://dist.springsource.org/release/GRECLIPSE/e3.7/
2.download gradle eclipse plugin ---http://dist.springsource.com/release/TOOLS/gradle




refer to following document:

Gradle STS Support -- 2.9.0 -- Installation

Note: The latest version of this file can always be found here

You can install the Gradle STS support in one of two ways. The easiest way to install is from the STS Dashboard extensions page. Simply search for "Gradle" to find the extension, select it and install.
Optionally (if you want editor support) you should also install the "Groovy Eclipse" extension in the same way.
Requirements:

Either one of the following:
An instance of STS 2.7.M1 or later based on Eclipse 3.6.2 or Eclipse 3.7.
An instance of Eclipse 3.6.2 or later. (The required components of STS will be pulled in during the installation process).
Optionally (if you want support for editing .gradle files) a compatible Groovy Eclipse installation is required (STS 2.9.0.M2 requires Groovy Eclipse 2.6.1. The Gradle tooling should be usable without Groovy Eclipse, but some functionality (related to editing gradle files) will not work.


Installation instructions:

Installing from the STS dashboard
The easiest way to install is from the STS Dashboard "Extensions" page. 
First download and install a recent release of STS (2.9.0 release or later recommended).
Open STS and in the dashboard click on the "Extensions" tab.
Search for "Gradle" or "Groovy" depending on you are installing, select it and click "Install".
Review the list of software that will be installed and click "Next".
Review and accept licence agreements and click "Finish".
Installing Gradle Tooling from update site

Alternatively you can install from update sites. The following update sites are available:
http://dist.springsource.com/snapshot/TOOLS/nightly/gradle (latest development snapshot)
http://dist.springsource.com/milestone/TOOLS/gradle (latest milestone build.)
http://dist.springsource.com/release/TOOLS/gradle (latest release)
Note: pasting the above URLs into a web browser will not work. You need to follow the instructions given below to use an Eclipse update site.

If you are installing into STS one of these update sites will be sufficient. 

If you are installing in a plain Eclipse, you will also need to add additional update sites to satisfy some dependencies. The easiest way is to download one of the following bookmarks files and save it to your hard drive then import the bookmarks:


For eclipse 3.7:
http://dist.springsource.com/release/TOOLS/composite/e3.7/bookmarks.xml
http://dist.springsource.com/milestone/TOOLS/composite/e3.7/bookmarks.xml
http://dist.springsource.com/snapshot/TOOLS/composite/e3.7/bookmarks.xml
For eclipse 3.6: 
http://dist.springsource.com/release/TOOLS/composite/e3.6/bookmarks.xml
http://dist.springsource.com/milestone/TOOLS/composite/e3.6/bookmarks.xml
http://dist.springsource.com/snapshot/TOOLS/composite/e3.6/bookmarks.xml
Detailed instructions: (steps 2..4 can be skipped if you are installing into STS).
Open "Help >> Install New Software"
Click "Available Software sites".
Click the "Import" button.
Find the saved "bookmarks.xml" file and click "OK".
Paste the Gradle update site link into the "Work with" text box
Select both available features (Gradle Tooling API and SpringSource Tool Suite Gradle Integration).
Click "Next"
Review the list of software that will be installed. Click "Next" again.

Review and accept licence agreement and Click "Finish".

Installing Groovy Eclipse from Update Site
To install Groovy Eclipse from update site see here.






How to import gradle project into eclipse:
1.import gradle project
2. select the folder
3.Click "build model"
4. import successfully.


Issue:
Cannot find System Java Compiler. Ensure that you have installed a JDK


--Solution: set Java_home in preference-->gradle-->Java_home
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 4
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值