Hi! I’m starting a fresh new project with KMP. But...
# community-support
j
Hi! I’m starting a fresh new project with KMP. But I see there is a lot happening regarding jvm versions :
Copy code
kotlin {
    androidTarget {
        compilerOptions {
            jvmTarget.set(JvmTarget.JVM_24)
        }
    }
    ...
}
android {
    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_24
        targetCompatibility = JavaVersion.VERSION_24
    }
    ...
}
I replaced “11” with “24" but I wonder if I need all of that, I also used
foojay-resolver-convention
with
jvmToolchain
on another project. What does one actually need?
e
Check plugin https://github.com/GradleUp/Tapmoc from @Martin
❤️ 1
c
i had this same question a few weeks ago. the tldr i got was that you probably want to keep it jdk 21 or eventually bump to 25, but it kinda doesn't matter because android doesn't actually use the jvm/jdk or something.
most of the time you only need to bump it up if some dependency you have requires you to bump it up
j
My question was not about the version itself but the way to set it. I wonder if the one preconfigured are necessary or if they can be replaced with
jvmToolchain
e
It is complicated. If I'm correct the toolchain is not enough or has its own drawbacks