aboutsummaryrefslogtreecommitdiff
path: root/buildSrc/src
diff options
context:
space:
mode:
authorsebastian.sellmair <sebastian.sellmair@jetbrains.com>2020-07-14 10:36:22 +0200
committerSebastian Sellmair <34319766+sellmair@users.noreply.github.com>2020-07-14 11:41:31 +0200
commit3428e347fb930cf02acbb6c52aaf98385709f7ac (patch)
tree9215b3a42a7b19f0d0a00ad1d0f9212e25d9ffc1 /buildSrc/src
parent7ff409fdf621932590dbf0118fff2c73dc76b951 (diff)
downloaddokka-3428e347fb930cf02acbb6c52aaf98385709f7ac.tar.gz
dokka-3428e347fb930cf02acbb6c52aaf98385709f7ac.tar.bz2
dokka-3428e347fb930cf02acbb6c52aaf98385709f7ac.zip
Add sourcesJar to shadow publications
Diffstat (limited to 'buildSrc/src')
-rw-r--r--buildSrc/src/main/kotlin/org/jetbrains/publication.kt5
1 files changed, 4 insertions, 1 deletions
diff --git a/buildSrc/src/main/kotlin/org/jetbrains/publication.kt b/buildSrc/src/main/kotlin/org/jetbrains/publication.kt
index 47fb23f2..289bd117 100644
--- a/buildSrc/src/main/kotlin/org/jetbrains/publication.kt
+++ b/buildSrc/src/main/kotlin/org/jetbrains/publication.kt
@@ -11,6 +11,7 @@ class DokkaPublicationBuilder {
enum class Component {
Java, Shadow
}
+
var artifactId: String? = null
var component: Component = Component.Java
}
@@ -23,8 +24,10 @@ fun Project.registerDokkaArtifactPublication(publicationName: String, configure:
this.artifactId = builder.artifactId
when (builder.component) {
DokkaPublicationBuilder.Component.Java -> from(components["java"])
- DokkaPublicationBuilder.Component.Shadow ->
+ DokkaPublicationBuilder.Component.Shadow -> run {
+ artifact(tasks["sourcesJar"])
extensions.getByType(ShadowExtension::class.java).component(this)
+ }
}
}
}