You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.4 KiB
51 lines
1.4 KiB
import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackConfig |
|
|
|
plugins { |
|
kotlin("multiplatform") |
|
id("org.jetbrains.compose") |
|
} |
|
|
|
group = "com.example" |
|
version = "1.0-SNAPSHOT" |
|
|
|
kotlin { |
|
@OptIn(org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl::class) |
|
wasmJs { |
|
moduleName = "jetsnackwasmapp" |
|
browser { |
|
commonWebpackConfig { |
|
outputFileName = "jetsnackwasmapp.js" |
|
devServer = (devServer ?: KotlinWebpackConfig.DevServer()).apply { |
|
|
|
static = (static ?: mutableListOf()).apply { |
|
add(project.rootDir.path) |
|
add(project.rootDir.path + "/common/") |
|
add(project.rootDir.path + "/web/") |
|
} |
|
} |
|
} |
|
} |
|
binaries.executable() |
|
} |
|
sourceSets { |
|
val commonMain by getting { |
|
dependencies { |
|
api(compose.runtime) |
|
api(compose.foundation) |
|
api(compose.material) |
|
@OptIn(org.jetbrains.compose.ExperimentalComposeLibrary::class) |
|
api(compose.components.resources) |
|
implementation(project(":common")) |
|
} |
|
} |
|
val commonTest by getting { |
|
dependencies { |
|
implementation(kotlin("test")) |
|
} |
|
} |
|
} |
|
} |
|
|
|
compose.experimental { |
|
web.application {} |
|
}
|
|
|