Creating a New Application
Last updated
Last updated
The recommended way to create a new application is to use plugin for IntelliJ IDEA. Just install the plugin from JetBrains Marketplace in your IDE and run File -> New -> Project...
from the main menu. Choose KVision
group, select desired project type and choose modules from the list on the first page. On the second page choose your project name and location. Your project will be generated and opened in IDE when you click Finish
button. After a few moments required to download all required dependencies you are ready to go.
You can also download and copy the project, available on GitHub.
The build.gradle.kts
file is responsible for the definition of the build process. It declares all required dependencies (in particular KVision optional modules). KVision Gradle plugin is used to simplify the configuration.
The source code for the application is contained in src/jsMain
directory. It consists of Kotlin sources in kotlin
directory, and some other files in the resources
directory (e.g. main index.html
, images, CSS files, Handlebars templates, translation files).
Test sources are contained in src/jsTest
directory.
The main KVision application class must extend the io.kvision.Application
class and override thestart
method.