natpryce
10/15/2018, 3:41 PMError:(17, 5) Kotlin: 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
What’s the solution to this?Casey Brooks
10/15/2018, 3:45 PMapply plugin: 'java'
apply plugin: "kotlin"
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
compileKotlin {
kotlinOptions {
jvmTarget = '1.8'
}
}
natpryce
10/15/2018, 3:46 PMkotlinOptions.jvmTarget
declaration in Gradle, but the bytecode it’s being inlined into is 1.6 bytecode in the library my code depends on.christophsturm
10/15/2018, 3:58 PMnatpryce
10/15/2018, 6:21 PMnatpryce
10/15/2018, 6:22 PMnatpryce
10/15/2018, 6:22 PMnatpryce
10/15/2018, 6:23 PMchristophsturm
10/15/2018, 6:30 PMnatpryce
10/15/2018, 6:31 PMnatpryce
10/15/2018, 6:31 PMnatpryce
10/15/2018, 6:31 PMnatpryce
10/15/2018, 6:32 PMCasey Brooks
10/15/2018, 6:34 PMnatpryce
10/15/2018, 6:35 PMnatpryce
10/15/2018, 6:35 PMCasey Brooks
10/15/2018, 6:48 PMcompileKotlin {}
doesn’t set the same value for the test
sourceset. Try adding compileTestKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}
to my snippet abovenatpryce
10/15/2018, 10:14 PMgildor
10/15/2018, 11:19 PM