Hey everyone, best wishes!
I’m currently migrating to version
6.0.1
with Kotlin
1.8.0
(mandatory I would assume from the build errors it gave me?). Gradle sync works fine, but when I try to build the project I’m presented with following error:
PROJECTPATH/build/generated/ksp/metadata/commonMain/kotlin/be/sigmadelta/PROJECTNAME/service/UserService.kt:15:9 Cannot inline bytecode built with JVM target 17 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option
So then I change the
jvmTarget
to `17`as prompted (see below):
jvm("backend") {
compilations.all {
java {
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "17"
freeCompilerArgs = listOf("-Xjsr305=strict")
}
...
Afterward I try to build again, but then it encounters a build error in `Main.kt`:
e: PROJECTPATH/src/backendMain/kotlin/be/sigmadelta/PROJECTNAME/Main.kt:56:5 None of the following functions can be called with the arguments supplied:
public fun Application.kvisionInit(vararg modules: Module): Injector defined in io.kvision.remote
public fun Application.kvisionInit(initStaticResources: Boolean, vararg modules: Module): Injector defined in io.kvision.remote
public fun Application.kvisionInit(initStaticResources: Boolean, json: Json, vararg modules: Module): Injector defined in io.kvision.remote
public fun Application.kvisionInit(json: Json, vararg modules: Module): Injector defined in io.kvision.remote
And this happens on an unchanged
kvisionInit
which worked fine on version `5.18.1`:
fun Application.main() {
...
kvisionInit(
Json {
prettyPrint = true
isLenient = true
classDiscriminator = "class"
},
KoinModules.tableModule,
KoinModules.repoModule,
KoinModules.serviceModule,
KoinModules.appModule(
this@main,
JwtProps(
secret = environment.config.property("jwt.secret").getString(),
issuer = environment.config.property("jwt.issuer").getString(),
audience = environment.config.property("jwt.audience").getString(),
realm = environment.config.property("jwt.realm").getString()
)
)
)
...
Does anyone know how to resolve this issue? I assume something is just going wrong with the mandatory Kotlin upgrade to
1.8.0