Browse Source

[web] Move build to the Kotlin DSL API

pull/685/head
Shagen Ogandzhanian 3 years ago
parent
commit
a6b4ce29f3
  1. 12
      web/core/build.gradle.kts
  2. 20
      web/integration/build.gradle.kts
  3. 6
      web/settings.gradle.kts

12
web/core/build.gradle → web/core/build.gradle.kts

@ -20,27 +20,27 @@ kotlin {
} }
sourceSets { sourceSets {
commonMain { val commonMain by getting {
dependencies { dependencies {
implementation(compose.runtime) implementation(compose.runtime)
implementation(kotlin("stdlib-common")) implementation(kotlin("stdlib-common"))
} }
} }
jsMain { val jsMain by getting {
dependencies { dependencies {
implementation(kotlin("stdlib-js")) 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 { dependencies {
implementation kotlin("test-js") implementation(kotlin("test-js"))
} }
} }
jvmMain { val jvmMain by getting {
dependencies { dependencies {
implementation(compose.desktop.currentOs) implementation(compose.desktop.currentOs)
} }

20
web/integration/build.gradle → web/integration/build.gradle.kts

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

6
web/settings.gradle → web/settings.gradle.kts

@ -6,13 +6,13 @@ pluginManagement {
url = uri("https://maven.pkg.jetbrains.space/public/p/compose/dev") url = uri("https://maven.pkg.jetbrains.space/public/p/compose/dev")
} }
maven { 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-core")
include "web-integration" include("web-integration")
project(":web-core").projectDir = file("$rootDir/core") project(":web-core").projectDir = file("$rootDir/core")
project(":web-integration").projectDir = file("$rootDir/integration") project(":web-integration").projectDir = file("$rootDir/integration")
Loading…
Cancel
Save