Hi have a multi module project that uses Koltin + Spring and Kotlin React. After migrating from JS to MULTIPLATFROM I noticed IDE made changes as follows
1. removed java.sourceCompatibility = JavaVersion.VERSION_17
2. added
Copy code
kotlin {
jvmToolchain(17)
}
3. Added
Copy code
implementation(kotlin("stdlib-jdk8"))
Is this a new recommended way things need to be defined???
Or is IntelliJ being optimistic ??? I been using JDK 17 with Kotlin.. .and things like Colection.stream were available without
stdlib-jdk8
defined???
v
Vampire
10/28/2024, 8:22 PM
Replacing
...Compatibility
by toolchains is imho always a good idea.
3. I'd say should not be necessary. Long ago you needed stdlib defined yourself, but since quite some time KGP should automatically add it for you, so I'd wonder why it should be added explicitly.
p
Paul Meshkovsky
10/28/2024, 8:23 PM
Great Thank you! this helps!
Paul Meshkovsky
10/28/2024, 8:27 PM
And regarding 3. This was exactly why I didn't include it before...
v
Vampire
10/28/2024, 8:31 PM
Maybe someone is going to correct me, but I'd say just ditch it and if everything works, it's still fine to not have it. 😄