Skip to content

Commit d16c8b2

Browse files
committed
refactor: migrate back to Dokka
* Add V2Enabled flag * Update GitHub Actions docs workflow * Update Dokka DSL usage
1 parent 75b37ac commit d16c8b2

6 files changed

Lines changed: 13 additions & 11 deletions

File tree

.github/workflows/docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ jobs:
4747
gradle-home-cache-strict-match: true
4848

4949
- name: Build docs
50-
run: ./gradlew dokkatooGeneratePublicationHtml --stacktrace
50+
run: ./gradlew dokkaGeneratePublicationHtml --stacktrace
5151

5252
- name: Setup Pages
5353
uses: actions/configure-pages@v3
5454
- name: Upload artifact
5555
uses: actions/upload-pages-artifact@v1
5656
with:
57-
# Upload Dokkatoo folder
57+
# Upload Dokka folder
5858
path: './build/dokka/html'
5959
- name: Deploy to GitHub Pages
6060
id: deployment

buildSrc/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ dependencies {
1111
implementation(libs.kotlinx.serialization.json)
1212

1313
// For precompiled scripts
14-
implementation(libs.dokkatoo.plugin)
14+
implementation(libs.dokka.plugin)
1515
implementation(libs.kotlin.mpp.plugin)
1616
}

buildSrc/src/main/kotlin/io/github/edricchan03/koogle_api/module.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ package io.github.edricchan03.koogle_api
66

77
plugins {
88
kotlin("multiplatform")
9-
dev.adamko.`dokkatoo-html`
9+
org.jetbrains.dokka
1010
}
1111

1212
group = "io.github.edricchan03.koogle-api"
@@ -24,12 +24,12 @@ kotlin {
2424
}
2525
}
2626

27-
dokkatoo {
27+
dokka {
2828
val moduleDoc = file("Module.md")
2929
val moduleDocExists = moduleDoc.exists()
3030
if (!moduleDocExists) logger.warn("The expected Module.md file at $moduleDoc doesn't exist!")
3131

32-
dokkatooSourceSets.configureEach {
32+
dokkaSourceSets.configureEach {
3333

3434
if (moduleDocExists) includes.from(moduleDoc)
3535

gradle.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@ kotlin.code.style=official
22
kotlin.js.generate.executable.default=false
33

44
org.gradle.configuration-cache=true
5+
6+
org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled

gradle/libs.versions.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ ktor-serialization-kotlinx-json = { module = "io.ktor:ktor-serialization-kotlinx
1212
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinx-serialization" }
1313

1414
# For precompiled script plugins
15-
dokkatoo-plugin = { module = "dev.adamko.dokkatoo:dokkatoo-plugin", version.ref = "dokkatoo" }
15+
dokka-plugin = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version.ref = "dokka" }
1616
kotlin-mpp-plugin = { module = "org.jetbrains.kotlin.multiplatform:org.jetbrains.kotlin.multiplatform.gradle.plugin", version.ref = "kotlin" }
1717

1818
[plugins]
19-
dokkatoo-html = { id = "dev.adamko.dokkatoo-html", version.ref = "dokkatoo" }
19+
dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }
2020
kotlin-mpp = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
2121
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }

plugins/generator/build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ plugins {
44
`java-gradle-plugin`
55
`kotlin-dsl`
66
kotlin("plugin.serialization") version embeddedKotlinVersion
7-
alias(libs.plugins.dokkatoo.html)
7+
alias(libs.plugins.dokka)
88
}
99

1010
group = "io.github.edricchan03.koogle-api"
@@ -29,10 +29,10 @@ dependencies {
2929
implementation(libs.kotlinx.serialization.json)
3030
}
3131

32-
dokkatoo {
32+
dokka {
3333
modulePath = "plugins/generator"
3434

35-
dokkatooSourceSets.configureEach {
35+
dokkaSourceSets.configureEach {
3636
includes.from("Module.md")
3737

3838
// Link to source

0 commit comments

Comments
 (0)