https://kotlinlang.org logo
#announcements
Title
# announcements
a

Alina Dolgikh [JB]

02/08/2023, 3:45 PM
🆕K🦜 📣 Kotlin 1.8.20-Beta brings many new features:New Kotlin K2 compiler updatesNew experimental Kotlin/Wasm targetNew JVM incremental compilation by default in GradleUpdate regarding Kotlin/Native targetsPreview of Gradle composite builds in Kotlin MultiplatformImproved output for Gradle errors in XcodeExperimental support for AutoCloseable interface in standard libraryExperimental support for Base64 encoding in standard library 📣 The K2 Compiler is going stable in Kotlin 2.0 We’ve been working on a new frontend for the Kotlin compiler (code-named “*K2*”) for quite a while. The new frontend is already available for preview – we’re continually polishing and stabilizing it and plan to make it the default compiler frontend in a future Kotlin release. We’ve decided to name this future release Kotlin 2.0. Learn more about the release roadmap and what to expect from Kotlin 2.0 Try out the new compiler frontend and give us feedback! Starting with Kotlin 1.8.20-Beta you can enable a preview of the Kotlin 2.0 language version via the regular Kotlin language version flag.
👀 2
2️⃣ 2
🎉 14
.wasm 18
K 13
K 85
❤️ 27
🙌 2
r

rocketraman

02/08/2023, 3:58 PM
Is the stable compiler plugin API still targeted for 2.0? The target version at https://youtrack.jetbrains.com/issue/KT-49508 is 1.10.0, which according to the post above is now 2.0.
d

dmitriy.novozhilov

02/08/2023, 4:04 PM
It won't be ready to 2.0 Stabilization of K2 itself is more important task than stable compiler API But we definitely want to stabilize it in future
🆗 2
i

itnoles

02/08/2023, 4:42 PM
Kotlin 2.0 is not supporting kapt. huge breaking change!
d

dmitriy.novozhilov

02/08/2023, 4:45 PM
What do you mean? K2 doesn't support kapt yet, and we are working on it
i

itnoles

02/08/2023, 4:46 PM
d

dmitriy.novozhilov

02/08/2023, 4:47 PM
Yep And there is a word "currently" in the error message
a

Arjan van Wieringen

02/08/2023, 8:11 PM
“Faster application runtime performance compared to Kotlin/JS and JavaScript because Wasm is a statically typed language.” This does not make sense to me? A statically typed language doesn’t have to be fast at all. The V8 engine is hiiiiighly optimized. WASM is cool but not automatically faster.
p

pepos

02/08/2023, 9:59 PM
WebAssembly 🚀
c

Colton Idle

02/08/2023, 11:05 PM
wooooo
🦜 2
m

Marc Reichelt

02/09/2023, 1:50 AM
Does Compose work with K2 already in 1.8.20-Beta? Last time I asked in #k2-early-adopters (see thread) the answer was: could be 1.8.20, maybe 1.9.0. Would love to finally try K2! CC @dmitriy.novozhilov
K 3
☝🏾 1
☝️ 2
d

dmitriy.novozhilov

02/09/2023, 8:13 AM
Main major issues from Compose side was fixed in Kotlin only in 1.9, so, unfortunately, no Compose support in 1.8.20
👍🏽 1
👍 4
🫣 1
m

Marc Reichelt

02/09/2023, 8:15 AM
Thanks for the info! 👍
g

gildor

02/10/2023, 6:04 PM
We would like to allocate resources for testing of K2, but it's not possible while neither compose nor kapt are supported
1
d

darkmoon_uk

02/11/2023, 12:15 AM
no Compose support in 1.8.20
...just as Gradle Composite support is fixed in
1.8.20
- yearning to use Composite in a Compose project - why do my stars refuse to align 🙃
1.9
is going to be a long wait.
r

rrva

02/12/2023, 8:35 AM
We have been running k2 for a kotlin/jvm project for a long time locally and then we disable it in CI. A nice tradeoff if you do not want to use it for release builds
Copy code
val isCiServer = System.getenv().containsKey("CI")

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
    kotlinOptions.useK2 = !isCiServer
}
or in 1.8.20+
Copy code
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
    kotlinOptions {
       if(!isCiServer) {
           languageVersion = "2.0"
       }
    }
}
👍 1
r

robstoll

02/17/2023, 10:08 AM
Are there any plans to have traits/mixins in kotlin in the near future? That's one feature I miss over and over again
🚫 1
😞 1
1019 Views