Skip to content

Commit

Permalink
scoverage#171 Add Kotlin HTML docs to the publication using Dokka
Browse files Browse the repository at this point in the history
  • Loading branch information
eyalroth committed Sep 21, 2021
1 parent cc98ce1 commit dca7361
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ plugins {
id("com.gradle.plugin-publish") version "0.15.0"
id("org.jetbrains.gradle.plugin.idea-ext") version "1.0"
kotlin("jvm") version "1.5.31"
id("org.jetbrains.dokka") version "1.5.30"
}

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

val kotlindocJar by tasks.registering(Jar::class) {
from(tasks.dokkaHtml.get().outputDirectory)
archiveClassifier.set("kotlindoc")
dependsOn(tasks.dokkaHtml)
}

val sourcesJar by tasks.registering(Jar::class) {
from(sourceSets["main"].allSource)
classifier = "sources"
archiveClassifier.set("sources")
}

fun propOrDefault(property: String): String {
Expand Down Expand Up @@ -203,6 +210,7 @@ configure<PublishingExtension> {
}
from(components["java"])
artifact(groovydocJar)
artifact(kotlindocJar)
artifact(sourcesJar)
}
}
Expand Down

0 comments on commit dca7361

Please sign in to comment.