diff options
author | KrystianUjma <kujma@virtuslab.com> | 2019-03-19 11:34:38 +0100 |
---|---|---|
committer | KrystianUjma <kujma@virtuslab.com> | 2019-03-19 15:56:01 +0100 |
commit | 2e94ac4098d9e2582223485b981114fa462e5757 (patch) | |
tree | ed1b772bce9d790c473b346bcce435e893b29be7 /buildSrc/src/main | |
parent | b566f8852e94f9a17be86bf845aeff6c36bd8378 (diff) | |
parent | a9c91cb7dc54c1554be5cf8de90516c929c0c1cb (diff) | |
download | dokka-2e94ac4098d9e2582223485b981114fa462e5757.tar.gz dokka-2e94ac4098d9e2582223485b981114fa462e5757.tar.bz2 dokka-2e94ac4098d9e2582223485b981114fa462e5757.zip |
Merge branch 'kotlin-website-jonnyzzz' into multiplatform-support
Diffstat (limited to 'buildSrc/src/main')
-rw-r--r-- | buildSrc/src/main/groovy/org/jetbrains/CorrectShadowPublishing.groovy | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/buildSrc/src/main/groovy/org/jetbrains/CorrectShadowPublishing.groovy b/buildSrc/src/main/groovy/org/jetbrains/CorrectShadowPublishing.groovy index 3e1d2106..4f6dcd75 100644 --- a/buildSrc/src/main/groovy/org/jetbrains/CorrectShadowPublishing.groovy +++ b/buildSrc/src/main/groovy/org/jetbrains/CorrectShadowPublishing.groovy @@ -4,22 +4,23 @@ import org.gradle.api.Project import org.gradle.api.artifacts.ModuleVersionIdentifier import org.gradle.api.artifacts.ProjectDependency import org.gradle.api.artifacts.SelfResolvingDependency -import org.gradle.api.publish.internal.ProjectDependencyPublicationResolver +import org.gradle.api.internal.artifacts.ivyservice.projectmodule.ProjectDependencyPublicationResolver import org.gradle.api.publish.maven.MavenPom import org.gradle.api.publish.maven.MavenPublication +//https://github.com/johnrengelman/shadow/issues/334 static void configure(MavenPublication publication, Project project) { publication.artifact(project.tasks.shadowJar) + publication.pom { MavenPom pom -> pom.withXml { xml -> def dependenciesNode = xml.asNode().appendNode('dependencies') project.configurations.shadow.allDependencies.each { - //if (! (it instanceof SelfResolvingDependency)) { if (it instanceof ProjectDependency) { - def projectDependencyResolver = project.gradle.services.get(ProjectDependencyPublicationResolver) - ModuleVersionIdentifier identifier = projectDependencyResolver.resolve(it) + final ProjectDependencyPublicationResolver projectDependencyResolver = project.gradle.services.get(ProjectDependencyPublicationResolver) + final ModuleVersionIdentifier identifier = projectDependencyResolver.resolve(ModuleVersionIdentifier, it) addDependency(dependenciesNode, identifier) } else if (!(it instanceof SelfResolvingDependency)) { addDependency(dependenciesNode, it) |