pablisco
05/09/2020, 7:55 PMarrow-fx
project and I need to target jdk8
.
I’ve changed the dependency to kotlin to use kotlin-stdlib-jdk8
and I’ve added the following:
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
I wasn’t sure if I needed both (kotlin and java compatibility markers) but I was trying to make it work.
I’ve even changed JAVA_VERSION
to be 1.8
on the modules gradle.properties
file.
Any who, despite all these changes, I’m getting the following errors from Animal Sniffer:
[Undefined reference] arrow.fx.(_IO.kt:19)
>> boolean java.util.concurrent.CompletableFuture.complete(Object)
[Undefined reference] arrow.fx.(_IO.kt:20)
>> boolean java.util.concurrent.CompletableFuture.completeExceptionally(Throwable)
[Undefined reference] arrow.fx.(_IO.kt:21)
>> boolean java.util.concurrent.CompletableFuture.completeExceptionally(Throwable)
[Undefined reference] arrow.fx.(_IO.kt:8)
>> Object java.util.concurrent.CompletableFuture.get()
[Undefined reference] arrow.fx.(_IO.kt:16)
>> java.util.concurrent.CompletableFuture
[Undefined reference] arrow.fx.(_IO.kt:16)
>> void java.util.concurrent.CompletableFuture.<init>()
[Undefined reference] arrow.fx.(_IO.kt:12)
>> boolean java.util.concurrent.CompletableFuture.cancel(boolean)
I’m having a look at this ticket: https://github.com/arrow-kt/arrow-fx/issues/153
These APIs were introduced on the jdk8, so this module needs to target that version (hence why it’s a separate module)
Anyone has experienced on how to configure animal sniffer in this instance?
If you want to check it locally this is the branch: https://github.com/arrow-kt/arrow-fx/tree/pabs-completable-future-integrationstojan
05/09/2020, 8:00 PMcompileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
// For Kotlin projects
kotlinOptions {
jvmTarget = "1.8"
}
stojan
05/09/2020, 8:01 PMpablisco
05/09/2020, 8:05 PMandroid { }
closure, right? This is a plain kotlin.stojan
05/09/2020, 8:35 PMstojan
05/09/2020, 8:36 PMpablisco
05/09/2020, 9:02 PMpablisco
05/09/2020, 9:12 PMpablisco
05/09/2020, 9:13 PMstojan
05/09/2020, 9:13 PMpablisco
05/09/2020, 9:55 PMpablisco
05/09/2020, 9:55 PM