Migration from 6.x to 7.x
This is the list of incompatibilities you may encounter when migrating your application to KVision 7.0.0.
Gradle 8.2 or later is required. If you are still using older version or you are not sure you can just use
./gradlew wrapper --gradle-version latest --distribution-type all
command (gradlew.bat
on Windows).kotlin("js")
Gradle plugin is deprecated in Kotlin 1.9.0 and is no longer supported by KVision Gradle plugin. To migrate your frontend-only project tokotlin("multiplatform")
plugin please follow the official guide. For a typical KVision application you just need to:Rename directories
src/main
tosrc/jsMain
andsrc/test
tosrc/jsTest
.Replace
kotlin("js")
withkotlin("multiplatform")
inside theplugins
section ofbuild.gradle.kts
file.Replace
sourceSets["main"]
withsourceSets["jsMain"]
andsourceSets["test"]
withsourceSets["jsTest"]
in thebuild.gradle.kts
file.
To unify configuration of all KVision applications, the fullstack projects are now using standard source sets names
jsMain
andjvmMain
(instead offrontendMain
andbackendMain
). To migrate your KVision fullstack project:Rename directories
src/frontendMain
tosrc/jsMain
,src/frontendTest
tosrc/jsTest
,src/backendMain
tosrc/jvmMain
andsrc/backendTest
tosrc/jvmTest
.Replace
jvm("backend")
tojvm
andjs("frontend")
tojs(IR)
in thebuild.gradle.kts
file.Replace
frontendMain
tojsMain
,frontendTest
tojsTest
,backendMain
tojvmMain
andbackendTest
tojvmTest
in thebuild.gradle.kts
file.Replace
processedResources/frontend/main
toprocessedResources/js/main
in thebuild.gradle.kts
file.Replace
processedResources/frontend/main
toprocessedResources/js/main
in thewebpack.config.d/webpack.js
file.
All custom Gradle tasks for fullstack applications are now integrated with KVision Gradle plugin. Unless you need some custom functionality you should remove all tasks declared after main
kotlin {}
block in yourbuild.gradle.kts
file (with the exception of server specific configuration for Jooby (joobyRun {}
block), Vert.x (vertx {}
block) and Kapt configuration for Micronaut). If you are using Javalin, Jooby or Ktor backend, you should also use newkotlin { jvm { mainRun {} } }
block to configure mainClass name. For more details about migration fullstack apps check the corresponding template projects in the kvision-examples repository.The
selectSize
property of theTomSelect
component was renamed tomaxOptions
to match the orginal JS component option name.Deprecated API has been removed. Be sure you to fix all your deprecation warnings before upgrading to KVision 7.
Last updated