如何在 Intellij IDEA 13.0.1 社区中创建基于 gradle 的 Java 项目 [英] How to create a gradle-based Java Project in Intellij IDEA 13.0.1 Community
问题描述
我想在 Intellij IDEA 中使用 Gradle 启动一个空项目,但它似乎不像 Eclipse 那样方便.
I want to start a empty project with Gradle in Intellij IDEA but it seems not so convenient as Eclipse does.
我所做的是文件->新建项目->Gradle.并且显示了一个项目,但尚未完成(例如,它没有 src 文件夹).
What I did is File->New Project->Gradle. And a project shows up but it's not completed (it has no src folder for example).
然后我在 build.gradle 中添加了 apply plugin 'idea'
.当我参考 IntelliJ IDEA 中的所有任务时.我没有 idea,cleanIdea,ideaProject
来设置 IntelliJ IDEA.
And I add apply plugin 'idea'
in the build.gradle. When I refer to the All tasks in IntelliJ IDEA. There are no idea,cleanIdea,ideaProject
for me to set up a IntelliJ IDEA.
在Eclipse+Gradle插件中,新建一个gradle项目就可以了.
In Eclipse+Gradle plugin, just create a new gradle project and everything is ready.
我想知道如何在 Intellij IDEA 中做到这一点.
I want to know how to do that in Intellij IDEA.
谢谢
推荐答案
创建新 Gradle 项目时,选择自动为空内容根目录创建目录".
When creating new Gradle project, select "Create directories for empty content roots automatically".
新项目将包含这些目录.
New project will have those directories.
这篇关于如何在 Intellij IDEA 13.0.1 社区中创建基于 gradle 的 Java 项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!