如何使用现有Gradle项目的Buildship [英] How to use Buildship with existing Gradle projects

查看:223
本文介绍了如何使用现有Gradle项目的Buildship的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的Eclipse工作区中有几个使用Gradle作为构建系统的项目。到目前为止,我从命令行运行Gradle命令。

I've got several projects in my Eclipse workspace that use Gradle as their build system. Up to now, I'm running the Gradle commands from the command line.

我已经安装了Buildship,以便更方便地从Gradle Tasks运行Gradle任务,视图。但是Buildship无法将我的工作区中的项目识别为Gradle项目。

I've installed Buildship in order to run Gradle tasks more conveniently from the "Gradle Tasks" view. But Buildship doesn't recognize the projects in my workspace as Gradle projects.

如何在Eclipse工作区中使用Buildship与现有Gradle项目?

How to use Buildship with existing Gradle projects in the Eclipse workspace?

推荐答案

现在,让buildship选择一个项目的唯一方法是使用导入向导。

The only way at the moment to make buildship pick up a project is to use the import wizard.


  • 从eclipse中删除您的项目(不会删除您的文件)
  • 文件 - >导入 - > gradle - > gradle项目

按照向导,您的项目现在应该显示为gradle项目。如果你发现你在eclipse中仍然没有任何依赖关系,那么它可能会选择一个现有的非buildship .project文件,在这种情况下,以下文章应该有所帮助:

follow the wizard and your project should now show up as a gradle project. If you find you still don't have any dependencies in eclipse then it is probably picking up an existing non-buildship .project file, In which case the following post should help:

  • How do I refresh project dependencies using Buildship in Eclipse?

这篇关于如何使用现有Gradle项目的Buildship的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆