Skip to content

Commit

Permalink
Fix publishing dependency version mapping (#309)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vechro authored May 5, 2023
1 parent ccd7a98 commit 09cab6c
Showing 1 changed file with 21 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,17 +104,33 @@ if (shouldPublish) {
val fjdj = tasks.create("fakeJavaDocJar", Jar::class) {
archiveClassifier.set("javadoc")
}
matching { it.name == "jvm" }.forEach { p ->
p as MavenPublication
p.artifact(fjdj)
named("js") {
this as MavenPublication
versionMapping {
allVariants {
fromResolutionOf("jsMainResolvableDependenciesMetadata")
}
}
}
all {
named("jvm") {
this as MavenPublication
this.artifact(fjdj)
versionMapping {
allVariants {
fromResolutionOf("commonMainApiDependenciesMetadata")
fromResolutionOf("jvmMainResolvableDependenciesMetadata")
}
}
}
named("kotlinMultiplatform") {
this as MavenPublication
versionMapping {
allVariants {
fromResolutionOf("commonMainResolvableDependenciesMetadata")
}
}
}
all {
this as MavenPublication
pom {
name.set(project.name)
description.set(project.name)
Expand Down

0 comments on commit 09cab6c

Please sign in to comment.