diff --git a/libraries/kotlin.test/build.gradle.kts b/libraries/kotlin.test/build.gradle.kts index eb29cc71693..bf0081abe5e 100644 --- a/libraries/kotlin.test/build.gradle.kts +++ b/libraries/kotlin.test/build.gradle.kts @@ -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().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 { suppressAllPomMetadataWarnings() - artifact(emptyJavadocJar) } } } diff --git a/libraries/kotlin.test/wasm/build.gradle.kts b/libraries/kotlin.test/wasm/build.gradle.kts index 7fda3e050a3..a1f5dd85f18 100644 --- a/libraries/kotlin.test/wasm/build.gradle.kts +++ b/libraries/kotlin.test/wasm/build.gradle.kts @@ -45,10 +45,3 @@ tasks.named("compileKotlinWasm") { (this as KotlinCompile<*>).kotlinOptions.freeCompilerArgs += "-Xir-module-name=kotlin-test" dependsOn(commonMainSources) } - -tasks.register("sourcesJar") { - dependsOn(commonMainSources) - archiveClassifier.set("sources") - from(kotlin.sourceSets["commonMain"].kotlin) - from(kotlin.sourceSets["wasmMain"].kotlin) -}