Using Kotlin 1.6 and Java 17 in Compose Multiplatform

Kotlin Multiplatform seems to only support Kotlin 1.5.31 and Java 16.

This is a freshly generated project in a freshly installed instance of IntelliJ IDEA Ultimate.

I’d like to use Kotlin 1.6.10 or 1.5.32 and Java LTS 17 with Kotlin Multiplatform, is that currently unsupported?

Also, I wasn’t able to figure out where to add suppressKotlinVersionCompatibilityCheck. There are questions about this on StackOverflow, but all the instructions are for Gradle Groovy.

So I found out Kotlin 1.6.10 is supported in 1.0.1-rc2+ in

It was unclear that I was supposed to read this document to use Kotlin 1.6.10 and Java 17. Idealy the plugin should be able to set up these for me or readme.md should include this information.

Just change plugins in build.gradle.kts:

plugins {
    kotlin("jvm") version "1.6.10"
    id("org.jetbrains.compose") version "1.0.1-rc2"
}

Also change jvmTarget to "17".

Anyways, I still haven’t figured out where to add suppress... in case I want to use a Kotlin release that is unsupported in Compose Multiplatform in the future.

There doesn’t seem to be documentation for Compose Multiplatform. I expected something like Kotlin Docs | Kotlin .

The best I could find is some readmes scattered around in the Git repo, and they do not do much.

The tutorials only cover getting started, and that doesn’t describe what each line of code is doing. Something like

https://doc.rust-lang.org/book/ch01-02-hello-world.html

would work better.

1 Like