简体   繁体   English

如何在Gradle中设置Kotlin的版本?

[英]How to set the version of Kotlin in Gradle?

How can I set the version of Kotlin in Gradle?如何在Gradle中设置Kotlin的版本?
I see that each Gradle version comes with its own Kotlin.我看到每个 Gradle 版本都有自己的 Kotlin。
How do I tell it to use another one (I want to use the latest Kotlin compiler)?我如何告诉它使用另一个(我想使用最新的 Kotlin 编译器)?

In order to use the latest Kotlin compiler, add this to your build.gradle(.kts)为了使用最新的 Kotlin 编译器,将其添加到您的 build.gradle(.kts)

plugins {
kotlin("multiplatform") version "1.5.31"
}

You can replace "1.5.31" with the version you want.您可以将“1.5.31”替换为您想要的版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM