aboutsummaryrefslogtreecommitdiff
path: root/build.gradle.kts
diff options
context:
space:
mode:
Diffstat (limited to 'build.gradle.kts')
-rw-r--r--build.gradle.kts20
1 files changed, 20 insertions, 0 deletions
diff --git a/build.gradle.kts b/build.gradle.kts
index b8879a31..a1b3a202 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -5,6 +5,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") apply false
id("java")
+ id("org.jetbrains.dokka") version "1.4.10.2"
}
val dokka_version: String by project
@@ -42,6 +43,7 @@ subprojects {
apply {
plugin("org.jetbrains.kotlin.jvm")
plugin("java")
+ plugin("org.jetbrains.dokka")
}
// Gradle metadata
@@ -50,6 +52,24 @@ subprojects {
withSourcesJar()
targetCompatibility = JavaVersion.VERSION_1_8
}
+
+ tasks {
+ val dokkaOutputDir = "$buildDir/dokka"
+
+ dokkaHtml {
+ outputDirectory.set(file(dokkaOutputDir))
+ }
+
+ val deleteDokkaOutputDir by registering(Delete::class) {
+ delete(dokkaOutputDir)
+ }
+
+ register<Jar>("javadocJar") {
+ dependsOn(deleteDokkaOutputDir, dokkaHtml)
+ archiveClassifier.set("javadoc")
+ from(dokkaOutputDir)
+ }
+ }
}
// Workaround for https://github.com/bintray/gradle-bintray-plugin/issues/267