[web] Move build to the Kotlin DSL API

This commit is contained in:
Shagen Ogandzhanian
2021-05-19 16:46:27 +02:00
parent 86c6f57b6d
commit a6b4ce29f3
3 changed files with 20 additions and 18 deletions

View File

@@ -20,27 +20,27 @@ kotlin {
}
sourceSets {
commonMain {
val commonMain by getting {
dependencies {
implementation(compose.runtime)
implementation(kotlin("stdlib-common"))
}
}
jsMain {
val jsMain by getting {
dependencies {
implementation(kotlin("stdlib-js"))
implementation(npm('css-typed-om', '0.4.0'))
implementation(npm("css-typed-om", "0.4.0"))
}
}
jsTest {
val jsTest by getting {
dependencies {
implementation kotlin("test-js")
implementation(kotlin("test-js"))
}
}
jvmMain {
val jvmMain by getting {
dependencies {
implementation(compose.desktop.currentOs)
}

View File

@@ -6,14 +6,14 @@ plugins {
kotlin {
jvm {
jvmTest {
tasks.named<Test>("jvmTest") {
testLogging.showStandardStreams = true
useJUnitPlatform()
systemProperty(
"COMPOSE_WEB_INTEGRATION_TESTS_DISTRIBUTION",
new File(buildDir, "developmentExecutable")
File(buildDir, "developmentExecutable")
)
}
}
@@ -32,7 +32,7 @@ kotlin {
}
sourceSets {
commonMain {
val commonMain by getting {
dependencies {
implementation(compose.runtime)
implementation(project(":web-core"))
@@ -40,20 +40,20 @@ kotlin {
}
}
jsMain {
val jsMain by getting {
dependencies {
implementation(kotlin("stdlib-js"))
implementation(npm('highlight.js', '10.7.2'))
implementation(npm("highlight.js", "10.7.2"))
}
}
jsTest {
val jsTest by getting {
dependencies {
implementation kotlin("test-js")
implementation(kotlin("test-js"))
}
}
jvmTest {
val jvmTest by getting {
dependencies {
implementation("org.slf4j:slf4j-api:1.7.30")
implementation("org.slf4j:slf4j-simple:1.7.30")
@@ -71,4 +71,6 @@ kotlin {
}
}
jvmTest.dependsOn(jsBrowserDevelopmentWebpack)
tasks.named<Test>("jvmTest") {
dependsOn(tasks.named("jsBrowserDevelopmentWebpack"))
}

View File

@@ -6,13 +6,13 @@ pluginManagement {
url = uri("https://maven.pkg.jetbrains.space/public/p/compose/dev")
}
maven {
url("https://packages.jetbrains.team/maven/p/ui/dev")
url = uri("https://packages.jetbrains.team/maven/p/ui/dev")
}
}
}
include "web-core"
include "web-integration"
include("web-core")
include("web-integration")
project(":web-core").projectDir = file("$rootDir/core")
project(":web-integration").projectDir = file("$rootDir/integration")