【发布时间】:2016-12-22 08:09:55
【问题描述】:
我正在使用 IntelliJ 中的简单 hello-world 应用程序尝试 gradle-script-kotlin。但是 IntelliJ 自动完成不会在 build.gradle.kts 文件中弹出。
https://github.com/gradle/gradle-script-kotlin/tree/master/samples/hello-world
build.gradle.kts:
apply<ApplicationPlugin>()
configure<ApplicationPluginConvention> {
mainClassName = ".HelloWorld"
}
configure<JavaPluginConvention> {
setSourceCompatibility(1.8)
setTargetCompatibility(1.8)
}
repositories {
jcenter()
}
dependencies {
testCompile("junit:junit:4.12")
}
settings.gradle:
rootProject.buildFileName = 'build.gradle.kts'
我安装了 IntelliJ kotlin 插件和 gradle 插件并使用 gradle 3.0。示例应用程序使用 gradle 命令。
如何配置 IntelliJ 以启用 build.gradle.kts 文件的自动完成功能?
我正在使用带有 kotlin 插件版本的 IntelliJ 2016.2.2:1.0.3-release-IJ2016.1-120
【问题讨论】:
标签: intellij-idea gradle kotlin