Mgj
07/29/2020, 12:46 PMcommonTest {
dependencies {
implementation(kotlin('test-common'))
implementation(kotlin('test-annotations-common'))
}
}
jvmTest {
def mockk_version = "1.10.0"
dependencies {
dependsOn(commonTest)
implementation kotlin('test')
implementation kotlin('test-junit')
implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime:$kotlin_serialization_version"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutines_version"
implementation "io.mockk:mockk:${mockk_version}"
implementation "io.ktor:ktor-client-serialization-jvm:$ktor_version"
implementation "io.ktor:ktor-client-json-jvm:$ktor_version"
}
}
However i think there's something funky going on with org.jetbrains.kotlinx:kotlinx-serialization even though supposedly it supports the JVM target - Every model i have which is annotated with @Serializable
gives the following error: error: incompatible types: Serializable cannot be converted to Annotation @java.io.Serializable()
rudolf.hladik
07/29/2020, 12:59 PM@Serializable
isn’t the same as @java.io.Serializable
Mgj
07/29/2020, 1:00 PMrudolf.hladik
07/29/2020, 1:01 PMMgj
07/29/2020, 1:02 PMplugins {
id 'org.jetbrains.kotlin.plugin.serialization' version '1.3.72'
id 'org.jetbrains.kotlin.multiplatform' version '1.3.72'
}
I can deploy to Android and iOS, but not JVM (where i want to run my tests)