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:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user