【问题标题】:Kotlin native MPP stability warningKotlin 原生 MPP 稳定性警告
【发布时间】:2022-12-04 11:35:30
【问题描述】:

In a Kotlin/native project, gradlew build successfully builds the project, but emits the warning:

Kotlin Multiplatform Projects are an Alpha feature. See: https://kotlinlang.org/docs/reference/evolution/components-stability.html. To hide this message, add \'kotlin.mpp.stability.nowarn=true\' to the Gradle properties.

So, I tried adding kotlin.mpp.stability.nowarn=true to settings.gradle.kts. This didn\'t work, I get the error:

Script compilation errors:
  Line 2: kotlin.mpp.stability.nowarn = true
                 ^ Unresolved reference: mpp
  Line 2: kotlin.mpp.stability.nowarn = true
                               ^ Variable expected
2 errors

I tried renaming settings.gradle.kts to settings.gradle to use Groovy syntax, but then I get the error:

A problem occurred evaluating settings \'kangaroo-kotlin\'.
> Could not get unknown property \'kotlin\' for settings \'kangaroo-kotlin\' of type org.gradle.initialization.DefaultSettings.

How to correctly set the flag to get rid of the warning?

    标签: kotlin gradle kotlin-native


    【解决方案1】:
    猜你喜欢
    • 2021-09-07
    • 1970-01-01
    • 1970-01-01
    • 2020-11-20
    • 2016-09-16
    • 1970-01-01
    • 2019-03-02
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多