Skip to content

Commit

Permalink
Bump dokka to v1.8.10 (#299)
Browse files Browse the repository at this point in the history
* Bump dokka to v1.8.10

* Fix Dokka plugin

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Erik Christensen <40830816+erikc5000@users.noreply.github.com>
  • Loading branch information
renovate[bot] and erikc5000 committed May 20, 2023
1 parent 658c070 commit 3d52852
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[versions]
kotlin = "1.8.10"
dokka = "1.7.10"
dokka = "1.8.10"
serialization = "1.5.1"
atomicfu = "0.20.2"
javamath2kmp = "1.0"
Expand Down
8 changes: 0 additions & 8 deletions tools/mkdocs-dokka-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
alias(libs.plugins.kotlinJvm)
}
Expand All @@ -9,9 +7,3 @@ dependencies {
implementation(libs.dokkaBase)
implementation(libs.dokkaGfm)
}

tasks.withType<KotlinCompile>().configureEach {
kotlinOptions {
jvmTarget = "1.8"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import org.jetbrains.dokka.base.DokkaBaseConfiguration
import org.jetbrains.dokka.base.signatures.SignatureProvider
import org.jetbrains.dokka.base.transformers.pages.comments.CommentsToContentConverter
import org.jetbrains.dokka.base.translators.documentables.DefaultPageCreator
import org.jetbrains.dokka.base.translators.documentables.PageContentBuilder
import org.jetbrains.dokka.model.DModule
import org.jetbrains.dokka.model.Documentable
import org.jetbrains.dokka.model.SourceSetDependent
Expand Down Expand Up @@ -58,7 +57,6 @@ class MkdocsPageCreator(
}
}
}
+contentForComments(m)

block(
"Packages",
Expand Down
10 changes: 9 additions & 1 deletion tools/mkdocs-dokka-plugin/src/main/kotlin/MkdocsPlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ import org.jetbrains.dokka.base.renderers.PackageListCreator
import org.jetbrains.dokka.base.renderers.RootCreator
import org.jetbrains.dokka.base.resolvers.shared.RecognizedLinkFormat
import org.jetbrains.dokka.gfm.GfmPlugin
import org.jetbrains.dokka.plugability.*
import org.jetbrains.dokka.plugability.DokkaPlugin
import org.jetbrains.dokka.plugability.DokkaPluginApiPreview
import org.jetbrains.dokka.plugability.PluginApiPreviewAcknowledgement
import org.jetbrains.dokka.transformers.pages.PageTransformer

class MkdocsPlugin : DokkaPlugin() {
Expand All @@ -15,6 +17,7 @@ class MkdocsPlugin : DokkaPlugin() {
private val dokkaBase by lazy { plugin<DokkaBase>() }
private val gfmPlugin by lazy { plugin<GfmPlugin>() }

@Suppress("unused")
val renderer by extending {
CoreExtensions.renderer providing ::MkdocsRenderer override gfmPlugin.renderer
}
Expand All @@ -23,13 +26,18 @@ class MkdocsPlugin : DokkaPlugin() {
mkdocsPreprocessors with RootCreator
}

@Suppress("unused")
val documentableToPageTranslator by extending {
CoreExtensions.documentableToPageTranslator providing ::MkdocsDocumentableToPageTranslator override dokkaBase.documentableToPageTranslator
}

@Suppress("unused")
val packageListCreator by extending {
(mkdocsPreprocessors
providing { PackageListCreator(it, RecognizedLinkFormat.DokkaGFM) }
order { after(rootCreator) })
}

@OptIn(DokkaPluginApiPreview::class)
override fun pluginApiPreviewAcknowledgement(): PluginApiPreviewAcknowledgement = PluginApiPreviewAcknowledgement
}

0 comments on commit 3d52852

Please sign in to comment.