Has anyone an idea how to correctly setup arrow in...
# arrow
p
Has anyone an idea how to correctly setup arrow in a plain module in Android or maybe in Android at all. I have just a simple module:
Copy code
apply(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...
This seems to be a problem with the plain module - seems to work as an Android module,so If anybody has an Idea how to correctly set that up I would be grateful.
s
have you tried with
Copy code
compileTestKotlin.kotlinOptions {
        jvmTarget = "1.8"
    }
p
Hey thx! Tried testCompileKotlin which didn't work and wasn't aware that I just did it wrong. Just thought, compileKotlin will work also for test.