Drop sources and javadoc artifacts for kotlin-test-wasm

There's a source and javadoc validation in sonatype that
once *-sources.jar or *-javadoc.jar is found expect main
jar must be present as well.

This doesn't work when instead of jar we publish klib.
This commit is contained in:
Nikolay Krasko
2021-11-11 15:18:22 +03:00
committed by teamcity
parent 71bf36b613
commit 4dc45a4118
2 changed files with 5 additions and 9 deletions
+5 -2
View File
@@ -338,6 +338,7 @@ publishing {
create("main", MavenPublication::class) {
from(rootComponent)
artifact(combinedSourcesJar)
artifact(emptyJavadocJar)
// Remove all optional dependencies from the root pom
pom.withXml {
val dependenciesNode = (asNode().get("dependencies") as NodeList).filterIsInstance<Node>().single()
@@ -353,6 +354,7 @@ publishing {
artifactId = "kotlin-test-$framework"
from(components[framework])
artifact(tasks.getByPath(":kotlin-test:kotlin-test-$framework:sourcesJar") as Jar)
artifact(emptyJavadocJar)
configureKotlinPomAttributes(project, "Kotlin Test Support for $framework")
}
}
@@ -360,30 +362,31 @@ publishing {
artifactId = "kotlin-test-js"
from(jsComponent)
artifact(tasks.getByPath(":kotlin-test:kotlin-test-js:sourcesJar") as Jar)
artifact(emptyJavadocJar)
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) {
artifactId = "kotlin-test-common"
from(commonMetadataComponent)
artifact(tasks.getByPath(":kotlin-test:kotlin-test-common:sourcesJar") as Jar)
artifact(emptyJavadocJar)
configureKotlinPomAttributes(project, "Kotlin Test Common")
}
create("annotationsCommon", MavenPublication::class) {
artifactId = "kotlin-test-annotations-common"
from(annotationsMetadataComponent)
artifact(tasks.getByPath(":kotlin-test:kotlin-test-annotations-common:sourcesJar") as Jar)
artifact(emptyJavadocJar)
configureKotlinPomAttributes(project, "Kotlin Test Common")
}
withType<MavenPublication> {
suppressAllPomMetadataWarnings()
artifact(emptyJavadocJar)
}
}
}
@@ -45,10 +45,3 @@ tasks.named("compileKotlinWasm") {
(this as KotlinCompile<*>).kotlinOptions.freeCompilerArgs += "-Xir-module-name=kotlin-test"
dependsOn(commonMainSources)
}
tasks.register<Jar>("sourcesJar") {
dependsOn(commonMainSources)
archiveClassifier.set("sources")
from(kotlin.sourceSets["commonMain"].kotlin)
from(kotlin.sourceSets["wasmMain"].kotlin)
}