Check this page when upgrading to a new version of KVision. Any backwards-incompatibilities will be described here. This is an evolving framework and things may change as refactorings and improvements take place, but we aim to keep the core as stable as possible.
This is the list of incompatibilities you may encounter when migrating your application to KVision 4.7.0:
- You need to upgrade Kotlin to 1.5.10.
- Due to changes in
webpack-dev-serveryou need to modify
DevServeroptions in your
build.gradle.ktsfile. Please replace:
proxy = mapOf(...)with
proxy = mutableMapOf(...)
contentBase = listOf(...)with
static = mutableListOf(...)
This is the list of incompatibilities you may encounter when migrating your application to KVision 4.5.0:
- You need to upgrade Kotlin to 1.5.0 and serialization to 1.2.0 in your project
- Webpack used internally by Kotlin/JS plugin was upgraded to 5.x. You need to adjust any custom configuration in your
webpack.config.ddirectory. Please use these bootstrap.js, css.js and file.js files as examples. You can find more information here.
kvision-onsenui-cssmodule was removed and integrated with
- When developing full-stack application with Spring Boot 2.4.5, you need to add this snippet to your
extra["kotlin.version"] = "1.5.0"
extra["kotlin-coroutines.version"] = "1.5.0-RC"
This is the list of incompatibilities you may encounter when migrating your application to KVision 4.1.0:
- DSL builder functions have been annotated with
@DslMarkerannotation, which provides strict scope control over implicit receivers. It can lead to compile errors for existing code with hard to notice bugs. Sometimes it may also be necessary to specify the receivers explicitly.
- Routing functionality has been externalized to optional modules. If your application uses built-in KVision routing, you need to add
kvision-routing-navigomodule to your dependencies and call
Routing.init()at the beginning of your
This is the list of incompatibilities you may encounter when migrating your application to KVision 4.0.0:
- Artifacts publication has been moved to Maven Central under new maven coordinates with
io.kvisiongroup identifier. You have to update all KVision dependencies in your
- All package names have been renamed with
io.kvisionprefix. You should replace your sources in the following order:
- Make sure you are not using any deprecated code before migrating. All methods, classes and functions deprecated before version 4.0.0 have been removed.
- If you use web sockets with Ktor backend you need to manually install WebSockets feature in your
- If you use Ktor backend you should move
kvisionInit()call to the end of your
- If you use
momentmodule with locale support you need to manually
require()all or some of the needed locales. You should also update
moment.jsfile in the
webpack.config.ddirectory from the current template.
- You should remove all Bintray repository addresses from your Gradle build files.
This is the list of incompatibilities you may encounter when migrating your application to KVision 3.13.x:
- Due to changes in the Kotlin/JS gradle plugin for Kotlin 1.4.0 it is necessary to fix your
webpack.config.d/webpack.jsfile. You can apply the following patch for
build.gradle.ktsfile and just copy new version of
webpack.jsfrom the current template project (standard or fullstack, respectively).
Patch for build.gradle.kts file
Kotlinx.serializationlibrary 1.0.0 contains a lot of incompatible changes, so you have to migrate your code if you are using this library directly.
Jedwas replaced by
gettext.jslibrary. You can safely delete
webpack.config.d/jed.jsfile. You need to make sure your
*.pofiles contain both
- All flexbox and grid CSS properties and enums have been moved to the
StyledComponentand the core package. Deprecated type aliases for refactored enums were added. Follow deprecation messages to remove deprecated types from your code.
- If you are using fullstack configuration with Spring Boot add
extra["kotlin.version"] = "1.4.0"to your
This is the list of incompatibilities you may encounter when migrating your application to KVision 3.5.x:
- Due to changes in the Kotlin/JS gradle plugin it is necessary to fix your
webpack.config.d/webpack.jsfile. Carefully analyze these changes for frontend projects and these changes for fullstack projects.
Kotlinx.serializationlibrary 0.20.0 contains also some incompatible changes, so you have to migrate your code if you are using this library directly.
This is the list of incompatibilities you may encounter when migrating your application to KVision 3:
setEventListener()method and the
onEvent()extension function return now an
Intinstead of a
Widget. The returned value can be used with
- The old, deprecated
setEventListener()method without type parameter has been removed. Use
- Problematic overloaded constructors for all css styling classes in the
TextShadowhas been removed. Each class has only one, primary constructor.
- There are two new factory extension functions for the
Color.hex()allows you to create a
Colorobject from a hexadecimal
Color.name()allows you to create a
Colorobject with an
- The dependency on the Pac4J library has been removed. The
p.t.k.remote.Profileclass has been removed as well. You can add Pac4J to your own project if you still want to use it.
- Jooby has been updated to version 2.x. You need to upgrade your application if you are using Jooby integration. See upgrade docs.
This is the list of incompatibilities you may encounter when migrating your application to KVision 2:
- All DSL builder functions have been moved out of the companion objects to allow better auto-completion in IntelliJ IDEA. This change is incompatible with KVision 1 code. To migrate you should just remove code based on this regular expression:
[^\.]+\.Companion\.from all your frontend code imports (Kotlin compiler will help you easily find all possible errors afterwards).
- The default font size in Bootstrap 4 is larger. You may have to adjust your application layout manually or use a custom CSS theme.
- The direct child of the
Rootcomponent is no longer 100% wide. Use
width = 100.percif you want it to be.
- The modules names have changed (the API of the components, package names, class names, methods and properties are mostly the same, with the differences described in details below).
KVision 1 module name
KVision 2+ module name
- Two new modules:
kvision-fontawesomewere extracted from the
- The Glyphicons support is dropped. Use Font Awesome icons instead.
- The Font Awesome icon names require a style prefix (
- Components like dropdown, context menu, modal, window, progressbar, navbar, toolbar, responsive grid, tab panel, tooltip and popover were moved into
ButtonStyle.DEFAULTwas removed. The
ButtonStyle.PRIMARYvalue is the new default. New
ButtonStyle.SECONDARYvalue is also available.
CheckBoxStyle.DEFAULTwere removed and are no longer necessary.
- The deprecated
Labelcomponent was removed. Use
TableType.CONDENSEDwas removed. Use new
responsiveproperty of the
Tablecomponent was removed. Use
responsiveTypeproperty with a chosen enum value instead.
dropupproperty of the
DropDowncomponent was removed. Use the
directionproperty with a
withCaretparameter of the
DropDowncomponent constructor was removed. No replacement at the moment.
NavbarType.STATICTOPwas removed. Use
- Do not use
Tag(TAG.LI)components when creating links inside
nav-linkclasses (or use
navLinkDSL builder function).
- When adding links to the
dropdown-itemclass (or use
cmLinkDSL builder functions respectively).
GridSize.XSwas removed from the
buttonsTypeis no longer a var property in the
SpinnerInputcomponents (changing its value didn't work anyway ;-)
DateTimeInputcomponents are based on a new version of bootstrap-datetimepicker. The
showmeridianproperties were removed. The
clearBtnproperties were renamed to
ObservableListclass was moved from
StateBindingcomponent was moved from
pl.treksoft.kvision.statepackage and is available in the main KVision module. It also can be used with any data source implementing
- The mapping of date and time classes between the client and the server code was significantly changed. The
pl.treksoft.kvision.types.Dateclass is deprecated and not supported anymore. You should use
pl.treksoft.kvision.typespackage instead. All of these classes are mapped to
kotlin.js.Dateon the client side, but to the corresponding
java.time.*class on the server side. This way you can easily use new Java types in your server side applications.
pl.treksoft.kvision.hmrpackage was removed and is not needed anymore. All KVision applications should now extend
pl.treksoft.kvision.Applicationclass and are executed with new
ReduxStore.subscribe()method calls the callback function once immediately right after the registration.
- Service functions for
TabulatorRemotewere changed to suspending. The function for
SelectRemotecomponent takes additional
- You are strongly encouraged to migrate your server-side interfaces common and frontend code with the help of the new KVision compiler plugin.