Skip to content

Commit

Permalink
Set up Javadoc publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewbailey committed Jun 30, 2020
1 parent 43abdbf commit 363b20b
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
26 changes: 26 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ buildscript {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'androidx.benchmark:benchmark-gradle-plugin:1.0.0'
classpath "org.jlleitschuh.gradle:ktlint-gradle:9.1.1"
classpath "org.jetbrains.dokka:dokka-gradle-plugin:0.10.1"
}
}

allprojects {
apply plugin: "org.jlleitschuh.gradle.ktlint"
apply plugin: 'org.jetbrains.dokka'

group = GROUP
version = VERSION_NAME
Expand All @@ -36,4 +38,28 @@ allprojects {
"no-wildcard-imports",
]
}

dokka {
outputDirectory = "$rootDir/docs/1.x"
outputFormat = 'html'
multiplatform {
global {
perPackageOption {
prefix = "dev.andrewbailey.difference"
suppress = true
}
}
jvm {}
}
}

task dokkaJavadoc(type: org.jetbrains.dokka.gradle.DokkaTask) {
outputFormat = 'html'
outputDirectory = "$buildDir/javadoc"
}

task javadocJar(type: Jar, dependsOn: dokkaJavadoc) {
classifier = 'javadoc'
from "$buildDir/javadoc"
}
}
4 changes: 4 additions & 0 deletions gradle/publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ publishing {
kotlinMultiplatform {
artifactId = POM_ARTIFACT_ID
}

jvm {
artifact(javadocJar)
}
}

repositories {
Expand Down

0 comments on commit 363b20b

Please sign in to comment.