Browse Source

Fix web components build & publishing

pull/1658/head
Alexey Tsvetkov 3 years ago
parent
commit
ad394bada4
  1. 11
      web/build.gradle.kts
  2. 4
      web/settings.gradle.kts
  3. 4
      web/widgets/build.gradle.kts

11
web/build.gradle.kts

@ -2,6 +2,10 @@ import org.gradle.api.tasks.testing.AbstractTestTask
import org.gradle.api.tasks.testing.logging.TestExceptionFormat import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.jetbrains.compose.gradle.kotlinKarmaConfig import org.jetbrains.compose.gradle.kotlinKarmaConfig
plugins {
kotlin("multiplatform") apply false
}
val COMPOSE_WEB_VERSION: String by project val COMPOSE_WEB_VERSION: String by project
val COMPOSE_REPO_USERNAME: String? by project val COMPOSE_REPO_USERNAME: String? by project
val COMPOSE_REPO_KEY: String? by project val COMPOSE_REPO_KEY: String? by project
@ -24,12 +28,16 @@ rootProject.plugins.withType<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJ
rootProject.the<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension>().nodeVersion = "16.13.1" rootProject.the<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension>().nodeVersion = "16.13.1"
} }
subprojects { subprojects {
apply(plugin = "maven-publish") apply(plugin = "maven-publish")
group = "org.jetbrains.compose.web" group = "org.jetbrains.compose.web"
version = COMPOSE_WEB_VERSION version = COMPOSE_WEB_VERSION
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>() {
kotlinOptions.jvmTarget = "11"
}
pluginManager.withPlugin("maven-publish") { pluginManager.withPlugin("maven-publish") {
configure<PublishingExtension> { configure<PublishingExtension> {
repositories { repositories {
@ -116,4 +124,3 @@ subprojects {
} }
} }
} }

4
web/settings.gradle.kts

@ -1,4 +1,3 @@
pluginManagement { pluginManagement {
val COMPOSE_CORE_VERSION: String by settings val COMPOSE_CORE_VERSION: String by settings
println("[build] compose core version: $COMPOSE_CORE_VERSION") println("[build] compose core version: $COMPOSE_CORE_VERSION")
@ -24,13 +23,12 @@ pluginManagement {
repositories { repositories {
gradlePluginPortal() gradlePluginPortal()
mavenCentral() mavenCentral()
repos?.forEach { urlPath -> repos?.forEach { urlPath ->
maven { maven {
url = uri(urlPath) url = uri(urlPath)
} }
} }
mavenLocal()
maven { maven {
url = uri("https://maven.pkg.jetbrains.space/public/p/compose/dev") url = uri("https://maven.pkg.jetbrains.space/public/p/compose/dev")
} }

4
web/widgets/build.gradle.kts

@ -49,3 +49,7 @@ kotlin {
} }
} }
} }
rootProject.plugins.withType<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootPlugin> {
rootProject.the<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension>().nodeVersion = "16.0.0"
}

Loading…
Cancel
Save