aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)
+ }
}
}
}