Building data2viz is not very easy. We started the project even before Kotlin Multiplatform and what we are trying to do is complicated.
I don’t know any other MPP UI project trying to target JS + Android + JFX. As a result, we face some severe issues:
- being able to have efficient development experience,
- doing rendering tests on very different environments,
- package and deploy.
The current version uses the old Kotlin MPP plugin. The new one, and its intellij idea integration, still have some bugs that make it unusable for the project. We decomposed Data2viz library into a lot of Gradle projects: one per module and per platform. The main advantage is the caching mechanism of Gradle that will recompile only modified projects, keeping the build time acceptable.
The best workflow, when working on a module, is to edit the code and then relaunch the build only on that project. The Gradle Wrapper can help here, by launching builds only in the context of the current directory.
Tests are also quite long and shouldn’t be launched during fast feedback loops:
gw build -x test
.
To accelerate builds, you can modify in gradle.properties
the type of project that will be activated.
# project activation
include_android=false
include_js=true
include_jfx=false
include_jfx_renderings=false