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 allcommand (gradlew.baton 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/maintosrc/jsMainandsrc/testtosrc/jsTest.Replace
kotlin("js")withkotlin("multiplatform")inside thepluginssection ofbuild.gradle.ktsfile.Replace
sourceSets["main"]withsourceSets["jsMain"]andsourceSets["test"]withsourceSets["jsTest"]in thebuild.gradle.ktsfile.
To unify configuration of all KVision applications, the fullstack projects are now using standard source sets names
jsMainandjvmMain(instead offrontendMainandbackendMain). To migrate your KVision fullstack project:Rename directories
src/frontendMaintosrc/jsMain,src/frontendTesttosrc/jsTest,src/backendMaintosrc/jvmMainandsrc/backendTesttosrc/jvmTest.Replace
jvm("backend")tojvmandjs("frontend")tojs(IR)in thebuild.gradle.ktsfile.Replace
frontendMaintojsMain,frontendTesttojsTest,backendMaintojvmMainandbackendTesttojvmTestin thebuild.gradle.ktsfile.Replace
processedResources/frontend/maintoprocessedResources/js/mainin thebuild.gradle.ktsfile.Replace
processedResources/frontend/maintoprocessedResources/js/mainin thewebpack.config.d/webpack.jsfile.
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.ktsfile (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
selectSizeproperty of theTomSelectcomponent was renamed tomaxOptionsto 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.