https://kotlinlang.org logo
Join Slack
Powered by
# dokka
  • e

    Edoardo Luppi

    06/05/2025, 5:29 PM
    Sharing my immediate feedback after the migration. 1. Setting a custom logo also required overwriting some CSS properties, otherwise the logo was stretched horizontally.
    Copy code
    .library-name--link::before {
      background-size: var(--dokka-logo-height) var(--dokka-logo-width);
      max-height: unset;
      max-width: unset;
    }
    2. The sidebar paddings are bit too much imo. 3. The hover highlight appears only on the package name or the toggle arrow, but not on both at the same time (is it intended?)
    o
    • 2
    • 1
  • n

    Nathan Fallet

    06/07/2025, 1:28 PM
    Hello! I wanted to know if there is a simple way to add custom markdown files. Like there is the kdoc, and I want to add an example/tutorial section in the menu, imported from markdown files (would seem to be the easiest option) There has to be an option or plugin for this (otherwise I’m making a plugin for it)
    h
    o
    • 3
    • 6
  • s

    Skolson5903

    06/14/2025, 1:46 AM
    Hopefully a quick question. I'm converting a kotlin multi-platform (KMP) library project to Dokka 2. I'm having trouble getting the HTML generated, and the doc at Dokka V 2.0 migration guide looks incorrect. It claims that this should be valid in the dokka block in build.gradle.kts:
    dokkaPublications.html {
    outputDirectory.set(rootDir.resolve("docs/api/0.x"))
    includes.from(project.layout.projectDirectory.file("README.md"))
    }
    but when I try this the html clause is an unresolved reference (using Idea 2025.2 EAP). And using the snippet below the builds/dokka folder has only an empty javadoc subfolder, so nothing is being generated. Since this is KMP I know V 2.0.0 doesn't support the javadoc option. What do I need to add to get the HTML to generate? Here's my beginning dokka snippet:
    Copy code
    dokka {
        moduleName.set("Kotlin Multiplatform Common IO Library")
        dokkaSourceSets.commonMain {
            includes.from("$appleFrameworkName.md")
        }
    }
    Also, as a followup, I've struggled to find an example of how to tell maven publish to publish the HTML once generated. I'd also appreciate any info on that. Thanks in advance for any help...
    o
    • 2
    • 12
  • n

    Nathan Fallet

    06/15/2025, 11:47 AM
    Hello! I saw this stale PR about sitemaps in Dokka. Is there any plan about it? I would love to see the feature, and can help if needed https://github.com/Kotlin/dokka/pull/2009
    o
    • 2
    • 4
  • s

    Skolson5903

    06/23/2025, 9:59 PM
    While diagnosing a publishing issue on my KMP project, I ran a gradle publish task with --info. The project is using
    applyDefaultHierarchyTemplate()
    so all the sourceSet names fit that template. Dokka produced a number of messages that surprised me, as if it doesn't understand the default hierarchy template. I posted the messages as a reply in this thread. Basically all the source sets that aren't leaf nodes in the default template are getting labeled as common. That seems to lead to it generating doc from appleMain into all the platforms, not just the Apple ones, etc. Is this expected behavior?
    o
    a
    • 3
    • 6
  • m

    MiguelDecimal128

    07/08/2025, 2:42 PM
    I am a dokka newbie ... struggling to get dokka 2.0.0 configured in IntelliJ 2024.3.6 on macOS Setting up from scratch ... not a migration. I am following documentation at https://kotlinlang.org/docs/dokka-get-started.html https://kotlinlang.org/docs/dokka-gradle.html#single-project-configuration ... but failing ... tasks are undefined If I try the other single-project configuration then the imports are undefined. I am able and willing to help improve for other newbies coming up.
    s
    • 2
    • 8
  • k

    Kenna Zimmerman

    07/25/2025, 3:53 PM
    I’m generating HTML documentation from auto-generated java files and I’m not seeing markdown syntax being recognized. Here’s an example of the generated file:
    Copy code
    /**
     * This is a new interface for testing dokka.
     *
     * This should be a new line
     *
     * And [this](<https://www.google.com/>) should be a hyperlink.
     */
    @Keep
    public abstract class NewInterface {
        /** [This](<https://www.google.com/>) should also be a hyperlink. */
        public abstract void foo();
    And attached is the generated HTML. Neither the new lines or hyperlinks are being recognized. Am I using the right syntax? Any ideas for solutions (or workarounds)? I’m using dokka version 2.0.0
    solved 1
    e
    • 2
    • 4
  • a

    Abe Sol

    07/26/2025, 7:24 AM
    Hi 🙂 This week I configured dokka on a project. I spent like an hour tweaking Gradle trying to figure out why the side bar was empty. It turns out one needs to load the html via a web server. Double clicking on
    index.html
    leaves the side bar empty. Something that would have saved me some frustration is including a
    <!-- please load via a web server -->
    HTML comment where the list should show up.
    a
    • 2
    • 2
  • o

    oshai

    08/01/2025, 8:02 PM
    Hi, I upgraded dokka plugin to 2.0 in this commit: https://github.com/oshai/kotlin-logging/commit/c6598126edfd0c8662a736d4023975928cfdf520 it seems the docs site was generated but all links are broken (clicking a class get 404) https://oshai.github.io/kotlin-logging/
    a
    • 2
    • 6
  • r

    rnett

    08/09/2025, 11:47 PM
    Is there a way to link to other modules from module documentation? I've tried KDoc-style links to the module name (
    [my-module]
    ), relative links to the directory (
    [my-module](./my-module)
    ), and relative HTML links (
    [my-module](../my-module/index.html)
    ), none of which work. The second two are rendered as the link address rather than being links.
    👀 1
    o
    a
    • 3
    • 9
  • p

    pardom

    08/11/2025, 6:18 PM
    Has anyone faced/resolved issues with Dokka V2 multi-module Javadoc generation? The HTML generation works for my composite build dependencies, but Javadoc generation produces empty directories.
    a
    o
    • 3
    • 7
  • v

    Vojtech Hrdina

    08/19/2025, 1:22 PM
    Hi, I am working on library that is using Jetpack Compose. Is there any way on how to display components using @sample annotation in KDoc? I am getting an error “Unresolved reference ‘androidx’” in interactive preview
    z
    o
    • 3
    • 4
  • o

    Oleg Yukhnevich

    08/27/2025, 4:27 PM
    🚀 Dokka 2.1.0-Beta is out! 🚀 • Gradle plugin v2 is now enabled by default – v1 is deprecated and will be removed in future releases! • K2 analysis is enabled by default – now with the support for context parameters! • Refined HTML output with improved accessibility & UI. • Performance improvements and bug fixes. We would really appreciate your feedback! kodee loving
    🔥 6
    dokkatoo intensifies 1
    j
    a
    • 3
    • 2
  • o

    outadoc

    09/03/2025, 5:10 PM
    Hello! I'd like to use Dokka in an Android library project to generate completely independent HTML sites for each build variant, as these variants have differences in their exposed API. I know how to do that using Dokka V1. I can declare a new Task for each Android variant I'm interested in, make it a
    DokkaTask
    , and suppress the source sets I'm not interested in. How would I achieve this with V2, as registering Dokka tasks now seems to be unsupported?
    o
    • 2
    • 5
  • l

    Lukas K-G

    09/10/2025, 6:48 AM
    Hello team, I am trying to customise our dokka usage a bit to make it more usable for our customers. Here are a few things I am trying to achieve: 1. bring back constructor arguments for enum entries ref where it got removed 2. have the arguments of the entries appear in the search 3. insert an additional page that collects information from multiple pages into a single, more concise collections. I am trying to achieve above by writing a custom plugin, which I managed to set up for basic functionality thanks to the help of the available documentation. 🎉 I am now struggling mainly with extracting the constructor arguments from the enum entries. My understanding is that this would have to happen in
    DefaultSymbolToDocumentableTranslator
    as this seems to be the only place that still has access to this kind of information but it does not seem to be extendible by plugins without having to copy/rewrite the whole thing. Would someone have any suggestions as to how this could be achieved?
    o
    • 2
    • 16
  • g

    Guilherme Delgado

    09/11/2025, 3:59 PM
    Hello! I’m migrating to Dokka v2 (2.0.0/2.1.0-Beta), and when I use
    ./gradlew dokkaGenerate
    in multi-module project, with:
    Copy code
    dependencies {
        dokka(project(":module-a"))
        dokka(project(":module-b"))
    }
    Everything is generated as expected. Unfortunately, the root - http://localhost:63342/MyProject/build/dokka/html/index.html -
    index.html
    and
    navigation.html
    only show the first module. If I open the file (not using localhost) I can navigate between modules because the
    index.html
    shows “All modules” but the
    navigation.html
    is not rendered. If I open the
    navigation.html
    file, the links for each module are correct. Any help?
    e
    o
    • 3
    • 4
  • c

    CLOVIS

    09/13/2025, 9:55 AM
    Dokka for MkDocs 0.5.3 is out! Dokka for MkDocs is an experimental new format for Dokka, allowing to embed your Dokka output seamlessly into a MkDocs website. Documentation • Visit the demo! • #C078Z1QRHL3
    👍 3
    👀 2
    🔥 3
    amaze 4
    🚀 2
    👍🏾 1
    s
    o
    • 3
    • 7
  • k

    Kelvin Chung

    09/30/2025, 4:17 AM
    Hey folks. I'm testing out a possible migration from dokkatoo to dokka 2.0, and I'm experiencing an issue with using the Dokka Gradle plugin, where my convention plugin is not recognizing a
    DokkaExtension
    despite applying
    org.jetbrains.dokka
    . Is there something I'm not doing correctly?
    a
    • 2
    • 2
  • s

    solonovamax

    10/03/2025, 5:10 AM
    hey, I'm having some issues with dokka producting very inconsistent behaviour. on my machine, dokka is producing the correct output. previously, on CI dokka was also producing the correct output. however for some reason, a recent change has caused dokka to no longer produce the output on CI, but it's still producing the correct output on my machine. here is an example of the expected output: https://ci.solo-studios.ca/job/solo-studios/job/kt-fuzzy/job/master/13/javadoc/kt-string-similarity/index.html here is an example of the incorrect output produced by CI: https://ci.solo-studios.ca/job/solo-studios/job/kt-fuzzy/job/master/14/javadoc/kt-string-similarity/index.html the commit in question which caused it was this: https://github.com/solo-studios/kt-fuzzy/commit/65587a03e1d38012fea9477bd0764a843c70dd54 however, I don't see how that affected it, so I'm just going to assume that it triggered some kind of funky thing to happen with the cache? I've got absolutely no clue why it's doing this.
    a
    • 2
    • 19
  • o

    Oleg Yukhnevich

    10/15/2025, 10:56 AM
    🚀 Dokka 2.1.0 release is out! 🚀 This version focuses on stabilizing experimental features, supporting new Kotlin language features, and improving the user experience. Key highlights include: • Dokka Gradle Plugin v2 is now enabled by default! • K2 Analysis is enabled by default! • Support for Context parameters and Nested typealiases • HTML format refinement: better accessibility and consistency across all components • Multiple performance and compatibility improvements We would really appreciate your feedback! kodee loving
    🎉 8
    kodee happy 6
    o
    • 2
    • 7
  • v

    Vladislav Artiukhov

    10/16/2025, 10:40 AM
    _Question About_: Linking documentation from javadoc.io Hi! I'm configuring dokka for my team's Kotlin project, and I want to link the OpenTelemetry's documentation. For example, for the package
    io.opentelemetry:opentelemetry-api
    , the documentation is hosted here; however, for https://javadoc.io, I cannot find a link that would download the
    package-list
    (I have several OpenTelemetry modules hosted on javadoc.io). On the official dokka documentation, I only found examples for kotlinlang.org and docs.oracle.com hosts. Please suggest to me the way to link documentation from javadoc.io.
    solved 1
    ✅ 1
    a
    c
    o
    • 4
    • 6
  • p

    Paulo Cereda

    10/16/2025, 5:40 PM
    Hi friends! With the release of dokka 2.1.0, I need to catch up and update our projects, so I beseech your wisdom. 😅 See thread. 🧵
    o
    a
    • 3
    • 9
  • m

    Max

    10/21/2025, 10:02 AM
    Hi everyone! I’m using the new Dokka
    2.1.0
    . I would like to add some static pages (“How to guides”) to my documantation. Could somehow tell me how I can do this? Tried several ways but nothing worked so far in v2
    a
    • 2
    • 4
  • o

    Oliver.O

    10/24/2025, 6:35 PM
    With Dokka 2.1.0, how would I create a plugin suppressing extension functions and properties in the top-level navigation? Failed attempt in 🧵.
    o
    • 2
    • 8
  • b

    Biplab Dutta

    10/29/2025, 9:45 AM
    Hi everyone, While working on Dokka for a new Kotlin Multiplatform, multi-module project, I noticed that most of the setup details for V2 are located under the “Migrate to Dokka Gradle plugin v2” page. For someone starting fresh with V2 (not migrating from V1), this can be a bit confusing since the README still shows examples or commands that appear closer to V1 usage. Would it make sense to open a small documentation issue suggesting either a clearer “Getting Started with Dokka V2” section or updated links from the README to the relevant V2 setup guide? I found the existing documentation very detailed once you know where to look, just thought this small addition could help new users get started faster.
    o
    • 2
    • 2
  • h

    HeyDeepak

    11/03/2025, 9:38 AM
    Hey! Do we have any samples for Android Library multi-Module? I am using Java ( Android Library for RTC ). The issue is that I am not able to create HTML for that codebase. HTML folder is empty.
    a
    • 2
    • 3
  • r

    Rey (Kingg22)

    11/11/2025, 10:47 AM
    Hi! Is it possible with Dokka to add Markdown files and create tabs or sections from those .md files that are separate from the API references? I’d like to have two main tabs or modules: Guides and API Reference, and also add links to navigate between them. Can this be done entirely with Dokka, or should I use another documentation tool for the guides and keep Dokka only for the API reference?
    c
    • 2
    • 5
  • a

    Adrian Landborn

    11/17/2025, 3:45 PM
    I am getting stuck when migrating from Dokka 2.0.0 to 2.1.0. 🧵 Setup: • Android Kotlin multi-module project with Compose. • The individual modules seems to compile the versioning parts has stopped working. This is what used to work: proj level build.gradle.kts
    Copy code
    dependencies {
        dokka(project(":xxx:foundation:"))
        dokka(project(":xxx:design:"))
        dokka(project(":xxx:icons:"))
    }
    
    ...
    
    // Project level Dokka setup
    pluginManager.withPlugin("org.jetbrains.dokka") {
        dokka {
            pluginsConfiguration.versioning {
                olderVersionsDir.set(layout.projectDirectory.dir("documentation/oldVersions"))
            }
            dokkaPublications.html {
                outputDirectory.set(layout.projectDirectory.dir("documentation/html"))
                includes.from("documentation/packages.md")
            }
        }
    }
    
    // Module level Dokka setup
    allprojects {
    val currentVersion = evaluateVersionName()
        val currentYear = Calendar.getInstance().get(Calendar.YEAR)
        pluginManager.withPlugin("org.jetbrains.dokka") {
            dokka {
                moduleName.set(project.name.replaceFirstChar { it.titlecase(Locale.getDefault()) }) // Capitalize first letter
                dokkaSourceSets.configureEach {
                    includes.from("$projectDir/README.md")
                    sourceLink {
                        basePublicationsDirectory
                        localDirectory.set(file("src/main/java"))
                        reportUndocumented.set(true) // Outputs to console if there are any undocumented elements
                        skipEmptyPackages.set(true)
                    }
                }
    
                pluginsConfiguration.html {
                    customAssets.from("${rootProject.rootDir}/documentation/logo-icon.svg")
                }
    
                pluginsConfiguration.versioning {
                    version = currentVersion
    
                    // If true, the dropdown with versions will be shown on all pages. Will increase compile build time.
                    renderVersionsNavigationOnAllPages = true
                }
            }
    }
    Any ideas how to move forward? 🙏
    o
    • 2
    • 10
  • e

    eenriquelopez

    11/20/2025, 6:13 PM
    I have update my Dokka version from 2.0.0 to 2.1.0. I didn’t have any specific configuration for my project (which is a multimodule project). I used to just run
    ./gradlew dokkaHtmlMultiModule
    and there was an aggregated doc being generated at
    /build/dokka/htmlMultiModule
    . Now when I try to run the same command I get the following:
    Cannot run Dokka V1 tasks when V2 mode is enabled.
    Dokka Gradle plugin V1 mode is deprecated, and scheduled to be removed in Dokka v2.2.0.
    To finish migrating to V2 mode, please check the migration guide https://kotl.in/dokka-gradle-migration
    Suggestion: Use
    dokkaGenerate
    or
    dokkaGenerateHtml
    tasks instead.
    If I run any of those tasks, I don’t get the generated documentation anymore. I also cannot see any relevant task that aggregates the documentation for all modules. Is there an equivalent of
    dokkaHtmlMultiModule
    that I can use?
    o
    • 2
    • 2
  • p

    Paulo Cereda

    11/21/2025, 8:44 AM
    Hi friends! When trying to generate HTML + Javadoc, I get the following warning:
    Copy code
    w: [:dokkaGeneratePublicationHtml] Couldn't resolve link for io.ktor.client.plugins.ClientRequestException in <file>/<fully qualified method>
    In the KDoc, I tried
    Copy code
    @throws io.ktor.client.plugins.ClientRequestException <description>
    and
    Copy code
    @throws ClientRequestException <description>
    with no luck. It's a KMP library. Any suggestions on what's happening? First time I stumbled upon this warning, and since we enable
    failOnWarning
    , we cannot move. 🙂 Thanks!
    c
    o
    • 3
    • 10