Is this behavior expected? I would expect printing...
# android
h
Is this behavior expected? I would expect printing
1.8
instead.
Copy code
plugins {
    kotlin("android") version "1.7.0"
    id("com.android.application") version "7.2.1"
}

android {
    kotlinOptions {
        jvmTarget = "1.8"
    }
}

tasks {
    withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
        println(kotlinOptions.jvmTarget) // prints null
    }
}
c
Can you try wrapping your println with
doLast
{}
And run a compile task. Maybe the configuration phased changed in 1.7
h
It is still null. And isn't the jvmTarget required for compiling?
c
with your 1.6 version, can you try setting the target to 11 or something else to see if it is not a coincidence that it is printing 1.8