Fix publishing for js

This commit is contained in:
Alexander Nozik 2021-06-04 19:02:25 +03:00
parent 329bfa5881
commit 670a4ca71e

View File

@ -21,7 +21,7 @@ internal fun Project.setupPublication(vcs: String) = allprojects {
configure<PublishingExtension> {
plugins.withId("org.jetbrains.kotlin.js") {
val kotlin: KotlinJsProjectExtension = extensions.findByType<KotlinJsProjectExtension>()!!
val kotlin: KotlinJsProjectExtension = extensions.findByType()!!
val sourcesJar: Jar by tasks.creating(Jar::class) {
archiveClassifier.set("sources")
@ -29,7 +29,7 @@ internal fun Project.setupPublication(vcs: String) = allprojects {
from(it.kotlin)
}
}
afterEvaluate {
publications {
create("js", MavenPublication::class) {
kotlin.js().components.forEach {
@ -39,6 +39,7 @@ internal fun Project.setupPublication(vcs: String) = allprojects {
}
}
}
}
plugins.withId("org.jetbrains.kotlin.jvm") {
val kotlin = extensions.findByType<KotlinJvmProjectExtension>()!!