[Wasm] Publish kotlin-test-wasm to maven
This commit is contained in:
@@ -274,9 +274,13 @@ dependencies {
|
|||||||
}
|
}
|
||||||
|
|
||||||
artifacts {
|
artifacts {
|
||||||
val wasmJar = tasks.getByPath(":kotlin-test:kotlin-test-wasm:wasmJar")
|
val wasmKlib = tasks.getByPath(":kotlin-test:kotlin-test-wasm:wasmJar")
|
||||||
add(wasmApi.name, wasmJar)
|
add(wasmApi.name, wasmKlib) {
|
||||||
add(wasmRuntime.name, wasmJar)
|
extension = "klib"
|
||||||
|
}
|
||||||
|
add(wasmRuntime.name, wasmKlib) {
|
||||||
|
extension = "klib"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val wasmComponent = componentFactory.adhoc("wasm").apply {
|
val wasmComponent = componentFactory.adhoc("wasm").apply {
|
||||||
@@ -358,6 +362,13 @@ publishing {
|
|||||||
artifact(tasks.getByPath(":kotlin-test:kotlin-test-js:sourcesJar") as Jar)
|
artifact(tasks.getByPath(":kotlin-test:kotlin-test-js:sourcesJar") as Jar)
|
||||||
configureKotlinPomAttributes(project, "Kotlin Test for JS")
|
configureKotlinPomAttributes(project, "Kotlin Test for JS")
|
||||||
}
|
}
|
||||||
|
create("wasm", MavenPublication::class) {
|
||||||
|
pom.packaging = "klib"
|
||||||
|
artifactId = "kotlin-test-wasm"
|
||||||
|
from(wasmComponent)
|
||||||
|
artifact(tasks.getByPath(":kotlin-test:kotlin-test-wasm:sourcesJar") as Jar)
|
||||||
|
configureKotlinPomAttributes(project, "Kotlin Test for WASM")
|
||||||
|
}
|
||||||
create("common", MavenPublication::class) {
|
create("common", MavenPublication::class) {
|
||||||
artifactId = "kotlin-test-common"
|
artifactId = "kotlin-test-common"
|
||||||
from(commonMetadataComponent)
|
from(commonMetadataComponent)
|
||||||
|
|||||||
@@ -1,8 +1,3 @@
|
|||||||
/*
|
|
||||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import org.jetbrains.kotlin.gradle.dsl.KotlinCompile
|
import org.jetbrains.kotlin.gradle.dsl.KotlinCompile
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
@@ -50,3 +45,10 @@ tasks.named("compileKotlinWasm") {
|
|||||||
(this as KotlinCompile<*>).kotlinOptions.freeCompilerArgs += "-Xir-module-name=kotlin-test"
|
(this as KotlinCompile<*>).kotlinOptions.freeCompilerArgs += "-Xir-module-name=kotlin-test"
|
||||||
dependsOn(commonMainSources)
|
dependsOn(commonMainSources)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks.register<Jar>("sourcesJar") {
|
||||||
|
dependsOn(commonMainSources)
|
||||||
|
archiveClassifier.set("sources")
|
||||||
|
from(kotlin.sourceSets["commonMain"].kotlin)
|
||||||
|
from(kotlin.sourceSets["wasmMain"].kotlin)
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user