[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("jvmSourcesElements")
|
||||||
|
|
||||||
variant("metadataApiElements")
|
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") {
|
variant("metadataSourcesElementsFromJvm") {
|
||||||
name = "metadataSourcesElements"
|
name = "metadataSourcesElements"
|
||||||
configuration {
|
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") {
|
// val common = module("commonModule") {
|
||||||
// mavenPublication {
|
// mavenPublication {
|
||||||
// groupId = "org.example"
|
// artifactId = "$artifactBaseName-common"
|
||||||
// artifactId = "sample-lib-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") {
|
|
||||||
// // Multiplatform KGP already added klib artifact to metadataApiElements
|
|
||||||
// // attributes { kotlinLegacyMetadataAttributes() }
|
|
||||||
// }
|
// }
|
||||||
|
// variant("commonMainMetadataElements")
|
||||||
// }
|
// }
|
||||||
val js = module("jsModule") {
|
val js = module("jsModule") {
|
||||||
mavenPublication {
|
mavenPublication {
|
||||||
|
|||||||
Reference in New Issue
Block a user