This message was deleted.
# community-support
s
This message was deleted.
c
That’s running on Java 17; are you somewhere setting a toolchain or otherwise using Java 21?
c
I have a android module that can't run on java 21 yet that i exclude it in the root build.gradle.kts:
Copy code
tasks.withType<KotlinCompile> {
    kotlinOptions {
        freeCompilerArgs = listOf("-Xjsr305=strict")
        jvmTarget = if(project.name == "android") "17" else libs.versions.jvm.target.get()
    }
}
in the backend build file, i've set :
Copy code
java.sourceCompatibility = JavaVersion.VERSION_21
with kotlin jvm plugin 1.9.21
c
Sure, but the underlying jvm is 17 therefore incapable of source=21. Run on Java 21 or (better) use toolchains.
🙌 1
You’re also mixing up jvnTarget with source compatibility, those aren’t the same thing.
💡 1
c
thanks for educating, i used toolchains in each module and removed jvmTarget alongside source compatibility( since toolchains infer it)
👍 1