Skip to content

Commit

Permalink
Merge pull request #63 from driessamyn/fix-dokka2
Browse files Browse the repository at this point in the history
Build: update to dokka v2 API.
  • Loading branch information
driessamyn authored Jan 30, 2025
2 parents ccd84f0 + 87459fe commit 9532def
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 6 deletions.
1 change: 1 addition & 0 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ dependencies {
// plugins
implementation(libs.deployer.plugin)
implementation(libs.dokka.plugin)
implementation(libs.dokka.javadoc.plugin)
implementation(libs.git.semver.plugin)
implementation(libs.ktlint.plugin)
implementation(libs.kotlin.jvm.plugin)
Expand Down
18 changes: 14 additions & 4 deletions buildSrc/src/main/kotlin/kapper.library-conventions.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ plugins {
id("org.jetbrains.kotlinx.kover")
id("org.jlleitschuh.gradle.ktlint")
id("org.jetbrains.dokka")
id("org.jetbrains.dokka-javadoc")
id("com.github.jmongard.git-semver-plugin")
}

Expand Down Expand Up @@ -117,7 +118,8 @@ tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach
dependsOn(tasks.ktlintFormat)
}

val integrationTestImplementation by configurations.getting {
@Suppress("unused")
val integrationTestImplementation: Configuration by configurations.getting {
extendsFrom(configurations.implementation.get())
}

Expand All @@ -141,8 +143,16 @@ tasks.withType<DokkaTask>().configureEach {
}
}

tasks.register<Jar>("dokkaJavadocJar") {
dependsOn(tasks.dokkaJavadoc)
from(tasks.dokkaJavadoc.flatMap { it.outputDirectory })
@Suppress("unused")
val dokkaJavadocJar by tasks.registering(Jar::class) {
description = "A Javadoc JAR containing Dokka Javadoc"
from(tasks.dokkaGeneratePublicationJavadoc.flatMap { it.outputDirectory })
archiveClassifier.set("javadoc")
}

@Suppress("unused")
val dokkaHtmlJar by tasks.registering(Jar::class) {
description = "A HTML Documentation JAR containing Dokka HTML"
from(tasks.dokkaGeneratePublicationHtml.flatMap { it.outputDirectory })
archiveClassifier.set("html-doc")
}
3 changes: 2 additions & 1 deletion buildSrc/src/main/kotlin/kapper.library-publish.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ publishing {
version = info.version
from(components["kotlin"])
artifact(tasks["sourcesJar"])
artifact(tasks["javadocJar"])
artifact(tasks["dokkaJavadocJar"])
artifact(tasks["dokkaHtmlJar"])
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled
org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true
4 changes: 3 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[versions]
dokka = "2.0.0"
junit-jupiter = "5.11.4"
kotest = "6.0.0.M1"
kotlin = "2.1.0"
Expand Down Expand Up @@ -29,7 +30,8 @@ test-containers-junit-postgresql = { module = "org.testcontainers:postgresql", v
# PLUGINS
## This way because buildSrc is not supported for plugins
deployer-plugin = { module = "io.deepmedia.tools.deployer:io.deepmedia.tools.deployer.gradle.plugin", version = "0.17.0" }
dokka-plugin = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version = "2.0.0" }
dokka-plugin = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version.ref = "dokka" }
dokka-javadoc-plugin = { module = "org.jetbrains.dokka-javadoc:org.jetbrains.dokka-javadoc.gradle.plugin", version.ref = "dokka" }
git-semver-plugin = { module = "com.github.jmongard:git-semver-plugin", version = "0.14.0" }
ktlint-plugin = { module = "org.jlleitschuh.gradle:ktlint-gradle", version = "12.1.2" }
kotlin-jvm-plugin = { module = "org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin", version.ref = "kotlin" }
Expand Down

0 comments on commit 9532def

Please sign in to comment.