[stdlib-mpp] publish legacy MPP common metadata additionally in a variant under 'common' classifier
This commit is contained in:
committed by
Space Team
parent
ff1dbab290
commit
671451fb67
@@ -743,6 +743,18 @@ publishing {
|
||||
variant("jvmSourcesElements")
|
||||
|
||||
variant("metadataApiElements")
|
||||
variant("commonMainMetadataElementsWithClassifier") {
|
||||
name = "commonMainMetadataElements"
|
||||
configuration {
|
||||
isCanBeConsumed = false
|
||||
}
|
||||
attributes {
|
||||
copyAttributes(from = project.configurations["commonMainMetadataElements"].attributes, to = this)
|
||||
}
|
||||
artifact(tasks["metadataJar"]) {
|
||||
classifier = "common"
|
||||
}
|
||||
}
|
||||
variant("metadataSourcesElementsFromJvm") {
|
||||
name = "metadataSourcesElements"
|
||||
configuration {
|
||||
@@ -784,16 +796,15 @@ publishing {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: decide what should be published in kotlin-stdlib-common
|
||||
// we cannot publish legacy common artifact with metadata in kotlin-stdlib-common
|
||||
// because it will cause problems in explicitly configured stdlib dependencies in project
|
||||
// val common = module("commonModule") {
|
||||
// mavenPublication {
|
||||
// groupId = "org.example"
|
||||
// artifactId = "sample-lib-common"
|
||||
// }
|
||||
// variant("commonMainMetadataElements") {
|
||||
// // Multiplatform KGP already added klib artifact to metadataApiElements
|
||||
// // attributes { kotlinLegacyMetadataAttributes() }
|
||||
// artifactId = "$artifactBaseName-common"
|
||||
// configureKotlinPomAttributes(project, "Kotlin Common Standard Library (for compatibility with legacy multiplatform)")
|
||||
// artifact(tasks["sourcesJar"]) // publish sources.jar just for maven, without including it in Gradle metadata
|
||||
// }
|
||||
// variant("commonMainMetadataElements")
|
||||
// }
|
||||
val js = module("jsModule") {
|
||||
mavenPublication {
|
||||
|
||||
Reference in New Issue
Block a user