I don´t have one...I am using the old format...
this is the client module
apply plugin: 'kotlin-platform-js'
if (production) {
apply plugin: 'kotlin-dce-js'
}
apply plugin: 'org.jetbrains.kotlin.frontend'
apply plugin: 'kotlinx-serialization'
dependencies {
expectedBy project(':common')
compile "org.jetbrains.kotlin
kotlin stdlib js${kotlinVersion}"
compile "pl.treksoft
kvision${kvisionVersion}"
compile "pl.treksoft
kvision bootstrap${kvisionVersion}"
compile "pl.treksoft
kvision bootstrap css${kvisionVersion}"
compile "pl.treksoft
kvision bootstrap select${kvisionVersion}"
compile "pl.treksoft
kvision bootstrap upload${kvisionVersion}"
compile "pl.treksoft
kvision fontawesome${kvisionVersion}"
compile "pl.treksoft
kvision remote${kvisionVersion}"
compile "pl.treksoft
kvision bootstrap datetime${kvisionVersion}"
compile "pl.treksoft
kvision datacontainer${kvisionVersion}"
compile "io.ktor
ktor client core1.1.4"
}
kotlinFrontend {
webpackBundle {
bundleName = "main"
contentPath = file('src/main/web')
proxyUrl = "
http://localhost:8080"
mode = production ? "production" : "development"
}
define "PRODUCTION", production
}
compileKotlin2Js {
kotlinOptions.metaInfo = true
kotlinOptions.outputFile = "$project.buildDir.path/js/${project.name}.js"
kotlinOptions.sourceMap = !production
kotlinOptions.moduleKind = 'umd'
}
compileTestKotlin2Js {
kotlinOptions.metaInfo = true
kotlinOptions.outputFile = "$project.buildDir.path/js-tests/${project.name}-tests.js"
kotlinOptions.sourceMap = !production
kotlinOptions.moduleKind = 'umd'
}
task copyResources(type: Copy) {
from "src/main/resources"
into file(buildDir.path + "/js")
}
task copyResourcesForDce {
doLast {
copy {
from "src/main/resources"
ext.modulesDir = new File("${buildDir.path}/node_modules_imported/")
if (modulesDir.exists()) {
modulesDir.eachDir {
if (it.name.startsWith("kvision")) {
from(it) {
include "css/**"
include "img/**"
include "js/**"
}
}
}
}
into file(buildDir.path + "/kotlin-js-min/main")
}
}
}
task dist(type: Copy, dependsOn: 'bundle') {
from "src/main/web"
from "${buildDir.path}/bundle"
into file(buildDir.path + "/distributions/" + project.name)
}
task distZip(type: Zip, dependsOn: 'dist') {
from (buildDir.path + "/distributions/" + project.name)
}
afterEvaluate {
if (production) {
tasks.getByName("copyResourcesForDce") { dependsOn(runDceKotlinJs) }
}
tasks.getByName("webpack-bundle") { dependsOn(copyResources, copyResourcesForDce) }
tasks.getByName("webpack-run") { dependsOn(copyResources) }
tasks.getByName("karma-start") { dependsOn(copyResources) }
}