KVision allows you to develop cross-platform (Windows, Linux and Mac), desktop applications with the full power of Electron framework. You can use all KVision components in your desktop applications, and the kvision-electron module gives you a complete set of Kotlin language bindings for Electron API.
The easiest way to start is to clone
template-electronproject from kvision-examples repository on GitHub. It contains the basic configuration for building, running and bundling your application. To run your application during the development call:
./gradlew runApp (on Linux)
gradlew.bat runApp (on Windows)
It will open an Electron window with your application running inside.
To bundle your application call:
./gradlew bundleApp (on Linux)
gradlew.bat bundleApp (on Windows)
It will create packed and unpacked app in the
If your application doesn't use any NodeJS or Electron API, you can use standard way of development, inside your favorite web browser.
The application is build with electron-builder tool. The configuration is contained in the
src/jsMain/electron/electron-builder.ymlconfiguration file. You can find documentation of electron-builder here. By default the application is built for the current platform only. Cross-platform build (e.g. for Windows on Linux host) is sometimes possible, but there are some additional requirements.
To use NodeJS and Electron API in your application, you have to add kvision-electron module to your
build.gradle.ktsdependencies. NodeJS Kotlin bindings are provided by kotlin-wrappers project and Electron bindings are provided directly by KVision module (package