Skip to content

Commit

Permalink
Add dokka for generating kdoc
Browse files Browse the repository at this point in the history
This also fixes #5
  • Loading branch information
mahozad committed Jul 8, 2021
1 parent 48638b4 commit 87195e5
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions piechart/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ val kotlinVersion: String by rootProject.extra
plugins {
id("com.android.library")
id("kotlin-android")
id("org.jetbrains.dokka") version "1.4.32"
id("maven-publish")
// To generate signature and checksum files for each artifact
id("signing")
Expand Down Expand Up @@ -93,17 +94,12 @@ tasks {
from(android.sourceSets["main"].java.srcDirs)
}

val javadoc by creating(Javadoc::class) {
isFailOnError = false
source = android.sourceSets["main"].java.getSourceFiles()
classpath += project.files(android.bootClasspath.plus(File.pathSeparator))
classpath += configurations.compile
}
val dokkaHtml by getting(org.jetbrains.dokka.gradle.DokkaTask::class)

val javadocJar by creating(Jar::class) {
dependsOn.add(javadoc)
dependsOn(dokkaHtml)
archiveClassifier.set("javadoc")
from(javadoc.destinationDir)
from(dokkaHtml.outputDirectory)
}

artifacts {
Expand Down

0 comments on commit 87195e5

Please sign in to comment.