ForteScarlet / kotlin-suspend-transform-compiler-plugin

A Kotlin compiler plugin for transforming suspend functions to platform-compatible non-suspend functions, such as the JVM Blocking API and CompletableFuture 🐱
MIT License
33 stars 3 forks source link

Support K2 #45

Closed ForteScarlet closed 7 months ago

ForteScarlet commented 7 months ago

Kotlin version: v1.9.22

可能不兼容 v2.0.0-Beta3,因为这两个版本的 Fir API 有不同(也可能是二进制兼容的,我不知道)。

目前考虑在 v2.0.0 稳定版本出来后再做升级。现在可以在 v1.9 下设置 languageVersion = "2.0“ 启用。

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
    kotlinOptions {
        // useK2
        languageVersion = "2.0"
    }
}

resolve #44