how do you set ```sourceCompatibility = 8 targetCompatibility = 8``` if you use `jvm { withJava() }`...
r
how do you set
Copy code
sourceCompatibility = 8
targetCompatibility = 8
if you use
jvm { withJava() }
?
c
i just use this:
Copy code
configure<JavaPluginConvention> {
    sourceCompatibility = JavaVersion.VERSION_1_8
}
t
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
Thanks, I have Java files, so I am going to try out christoph's solution. I am already using jvmTarget for Kotlin