43 lines
1.3 KiB
Kotlin
43 lines
1.3 KiB
Kotlin
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
|
|
import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackConfig
|
|
|
|
plugins {
|
|
alias(libs.plugins.kotlin.multiplatform)
|
|
alias(libs.plugins.compose)
|
|
alias(libs.plugins.compose.compiler)
|
|
}
|
|
|
|
kotlin {
|
|
@OptIn(ExperimentalWasmDsl::class)
|
|
wasmJs {
|
|
moduleName = "composeApp"
|
|
browser {
|
|
val projectDirPath = project.projectDir.path
|
|
commonWebpackConfig {
|
|
outputFileName = "webApp.js"
|
|
devServer = (devServer ?: KotlinWebpackConfig.DevServer()).apply {
|
|
static = (static ?: mutableListOf()).apply {
|
|
// Serve sources to debug inside browser
|
|
add(projectDirPath)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
binaries.executable()
|
|
}
|
|
|
|
sourceSets {
|
|
|
|
commonMain.dependencies {
|
|
implementation(compose.runtime)
|
|
implementation(compose.foundation)
|
|
implementation(compose.material)
|
|
implementation(compose.ui)
|
|
implementation(compose.components.resources)
|
|
implementation(compose.components.uiToolingPreview)
|
|
implementation(project(":shared"))
|
|
}
|
|
}
|
|
}
|
|
|
|
|