sigmadelta
01/02/2023, 7:59 AM6.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
Robert Jaros
01/02/2023, 8:09 AMJavaVersion.VERSION_1_8
to JavaVersion.VERSION_17
as well?Robert Jaros
01/02/2023, 8:09 AMsigmadelta
01/02/2023, 8:14 AMJavaVersion.VERSION_1_8
to JavaVersion.VERSION_17
, and the javaVersion
mentioned in gradle.properties
to 17
as well; but it makes no difference currently.
My project is also configured to use the Zulu JDK 17
, tried switching over to the Jetbrains JDK 17 but that also doesn’t make a difference currentlyRobert Jaros
01/02/2023, 8:15 AMsigmadelta
01/02/2023, 8:16 AM./gradlew clean assemble
results in the same build errors as in the IDE so I assume it’s not IntelliJ relatedRobert Jaros
01/02/2023, 8:16 AMsigmadelta
01/02/2023, 8:17 AMRobert Jaros
01/02/2023, 8:30 AMRobert Jaros
01/02/2023, 8:31 AMkvisionInit
Robert Jaros
01/02/2023, 8:31 AMRobert Jaros
01/02/2023, 8:32 AMsigmadelta
01/02/2023, 8:32 AMRobert Jaros
01/02/2023, 8:33 AMRobert Jaros
01/02/2023, 8:33 AMsigmadelta
01/02/2023, 8:34 AMadd(
methods and suchsigmadelta
01/02/2023, 8:34 AMRobert Jaros
01/02/2023, 8:34 AMRobert Jaros
01/02/2023, 8:34 AMRobert Jaros
01/02/2023, 8:34 AMsigmadelta
01/02/2023, 8:42 AMRobert Jaros
01/02/2023, 8:42 AMsigmadelta
01/02/2023, 8:45 AM./gradlew kotlinUpgradeYarnLock
if required by IntelliJ
• Follow migrationguide details