In Kotlin project, what is a proper Gradle script to make sure my classes will be compiled to byte code ver 52 (Java 8)?
For some reason my classes are compiled as v
In your build.gradle.kts:
build.gradle.kts
tasks { val java = "11" compileKotlin { kotlinOptions { jvmTarget = java } sourceCompatibility = java } }
Or like this:
tasks { withType { kotlinOptions { jvmTarget = "11" } } }