import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl plugins { alias(libs.plugins.kotlin.multiplatform) alias(libs.plugins.compose) alias(libs.plugins.kotlin.compose) } kotlin { @OptIn(ExperimentalWasmDsl::class) wasmJs { browser() binaries.executable() } sourceSets { commonMain.dependencies { implementation(project(":shared")) implementation(compose.runtime) implementation(compose.foundation) implementation(compose.material3) implementation(compose.ui) } wasmJsMain.dependencies { } } } /* * The directory produced by wasmJsBrowserDistribution. * * This is deliberately kept here rather than being referenced by * the server project. The web project owns its build layout. */ val webDistributionDirectory = layout.buildDirectory.dir("dist/wasmJs/productionExecutable") /* * Expose the web distribution as an outgoing artifact. * * Other projects can consume: * * project(path = ":web", configuration = "webDistribution") * * without knowing where the files actually live. */ val webDistributionTask = tasks.named("wasmJsBrowserDistribution") configurations { create("webDistribution") { isCanBeConsumed = true isCanBeResolved = false } } artifacts { add( "webDistribution", webDistributionDirectory ) { builtBy(webDistributionTask) } }