![](/img/trans.png)
[英]Why I cannot access project properties in "plugins" section of build.gradle.kts with Gradle Kotlin DSL (5.0)?
[英]Why is Intellij not creating a build.gradle.kts for a new kotlin project?
要创建基于 gradle 的项目(在 kotlin 中),您必须 select
New Project->Gradle->Check Kotlin DSL BuildScript->Kotlin/JVM
如果您取消选中 Kotlin DSL BuildScript,则创建build.gradle
,而在检查时您会发现build.gradle.kts
文件
PS:
If you want to migrate existing project with Groovy gradle to Kotlin DSL check this out https://medium.com/mindorks/migrating-gradle-build-scripts-to-kotlin-dsl-89788a4e383a
如果要将 gradle 添加到现有的非 gradle 项目中,请右键单击项目结构中的项目,然后从那里添加对 gradle 的支持
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.