如何在IntelliJ-plugin项目中启用gradle [英] How to enable gradle in an IntelliJ-plugin project

查看:851
本文介绍了如何在IntelliJ-plugin项目中启用gradle的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当您创建一个IntelliJ 13插件项目时,您不能选择将其作为Gradle项目。如何启动一个由Gradle支持的插件开发项目?

当前版本的IntelliJ仅适用于13.1.2支持1.10版本的Gradle集成。将此版本的Gradle配置为您项目的gradle home。



现在开始在您的项目中创建一个 build.gradle 文件项目根目录。

如果您尝试在IntelliJ中运行gradle构建,您将收到以下消息:运行构建错误:Module'your-plugin'为不由gradle支持。关闭并重新打开您的项目。



您现在可以选择导入您的项目。



Viola!


When you create an IntelliJ 13 plugin project you can't also choose to make it a Gradle project. How do you start a plugin development project that is backed by Gradle?

解决方案

The current version of IntelliJ, 13.1.2, only supports Gradle-integration up to version 1.10. Configure this version of Gradle as your project's gradle home.

Now start by creating a build.gradle file in your project root.

If you try to run the gradle build in IntelliJ now you will get the message: "Error running build: Module 'your-plugin' is not backed by gradle". Close and reopen your project.

You will now have the option to import your project.

Viola!

这篇关于如何在IntelliJ-plugin项目中启用gradle的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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