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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
// JVM target applied to all Kotlin tasks across all subprojects
// Kotlin DSL
tasks.withType {
kotlinOptions.jvmTarget = JavaVersion.VERSION_1_8.toString()
}
//Groovy
tasks.withType(KotlinCompile) {
kotlinOptions.jvmTarget = JavaVersion.VERSION_1_8
}