Skip to content

Commit

Permalink
build: Fix generated Javadoc replacing the actual Dokka input.
Browse files Browse the repository at this point in the history
  • Loading branch information
nhubbard committed Feb 29, 2024
1 parent 802fec7 commit 43ebfb3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -184,4 +184,7 @@ private.properties
.vscode
.java-version
act
*.log
*.log

# Gradle extras
property*/
17 changes: 13 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ plugins {
}

group = "io.github.nhubbard"
version = "2.0.1"
version = "2.0.2"

val projectDescription =
"A type-safe cascading configuration library for Kotlin and Java, supporting most configuration formats"
Expand Down Expand Up @@ -153,7 +153,6 @@ tasks.check {
}

tasks.dokkaHtml {
outputDirectory.set(tasks.javadoc.get().destinationDir)
dokkaSourceSets {
configureEach {
jdkVersion.set(17)
Expand All @@ -171,8 +170,18 @@ tasks.sourcesJar {
from(sourceSets.main.get().allSource)
}

tasks.javadocJar {
from(tasks.dokkaHtml)
tasks.withType<Javadoc>().all { enabled = false }

tasks.javadocJar.configure {
dependsOn(tasks.dokkaHtml)
from(tasks.dokkaHtml.get().outputDirectory)
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}

tasks.named<Jar>("javadocJar") {
dependsOn(tasks.dokkaHtml)
from(tasks.dokkaHtml.get().outputDirectory)
excludes.addAll(tasks.javadoc.get().destinationDir?.listFiles()?.map { it.toString() } ?: listOf())
}

kotlin {
Expand Down

0 comments on commit 43ebfb3

Please sign in to comment.