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
If you're getting an error like this:
Cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6. Please specify proper '-jvm-target' option.
Then, you can simply add the following in build.gradle (in Groovy) in order to tell kotlin to build using 1.8.
compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}