Skip to content

Commit dca7361

Browse files
committed
scoverage#171 Add Kotlin HTML docs to the publication using Dokka
1 parent cc98ce1 commit dca7361

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

build.gradle.kts

+10-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ plugins {
33
id("com.gradle.plugin-publish") version "0.15.0"
44
id("org.jetbrains.gradle.plugin.idea-ext") version "1.0"
55
kotlin("jvm") version "1.5.31"
6+
id("org.jetbrains.dokka") version "1.5.30"
67
}
78

89
repositories {
@@ -139,13 +140,19 @@ gradlePlugin {
139140
// TODO #171 remove once all groovy classes are migrated to kotlin
140141
val groovydocJar by tasks.registering(Jar::class) {
141142
from("$buildDir/docs/groovydoc")
142-
classifier = "groovydoc"
143+
archiveClassifier.set("groovydoc")
143144
dependsOn(tasks["groovydoc"])
144145
}
145146

147+
val kotlindocJar by tasks.registering(Jar::class) {
148+
from(tasks.dokkaHtml.get().outputDirectory)
149+
archiveClassifier.set("kotlindoc")
150+
dependsOn(tasks.dokkaHtml)
151+
}
152+
146153
val sourcesJar by tasks.registering(Jar::class) {
147154
from(sourceSets["main"].allSource)
148-
classifier = "sources"
155+
archiveClassifier.set("sources")
149156
}
150157

151158
fun propOrDefault(property: String): String {
@@ -203,6 +210,7 @@ configure<PublishingExtension> {
203210
}
204211
from(components["java"])
205212
artifact(groovydocJar)
213+
artifact(kotlindocJar)
206214
artifact(sourcesJar)
207215
}
208216
}

0 commit comments

Comments
 (0)