https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
r

robstoll

04/18/2021, 9:37 AM
how do you set
Copy code
sourceCompatibility = 8
targetCompatibility = 8
if you use
jvm { withJava() }
?
c

christophsturm

04/18/2021, 5:43 PM
i just use this:
Copy code
configure<JavaPluginConvention> {
    sourceCompatibility = JavaVersion.VERSION_1_8
}
t

Tomasz Krakowiak

04/19/2021, 10:26 AM
I use:
Copy code
jvm {
        compilations.all {
            kotlinOptions.jvmTarget = "1.8"
It corresponds to
targetCompatibility
. I don't think
sourceCompatibility
has any meaning with respect to kotlin source (assuming you don't write native Java).
r

robstoll

04/19/2021, 12:39 PM
Thanks, I have Java files, so I am going to try out christoph's solution. I am already using jvmTarget for Kotlin
3 Views