Pueffl
10/19/2020, 6:17 PMapply(plugin: "kotlin")
apply(plugin: "kotlin-kapt")
sourceCompatibility = "8"
targetCompatibility = "8"
compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}
dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$versions.kotlin")
implementation("io.arrow-kt:arrow-core:$versions.arrow")
implementation("io.arrow-kt:arrow-fx:$versions.arrow")
testImplementation("junit:junit:4.13")
testImplementation("com.google.truth:truth:$versions.truth")
testImplementation("io.mockk:mockk:$versions.mockk")
}
This is compilable, but when I try to run a Test, I get the following exception:
e: C\Development\Projects\test\eight\android\domain\src\test\kotlin\com\eight\domain\simple\EmailAddressTest.kt (16, 20): 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
Adding support for Java 8 language features could solve this issue.
Change Java language level and jvmTarget to 8 in all modules if using a lower level.
More information...Pueffl
10/19/2020, 6:30 PMSebastian Galkin
10/19/2020, 7:49 PMcompileTestKotlin.kotlinOptions {
jvmTarget = "1.8"
}
Pueffl
10/20/2020, 5:58 PM