https://kotlinlang.org logo
Docs
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
dokka
  • j

    Jim

    11/29/2021, 7:00 PM
    👋 I'm trying to run
    ./gradlew dokkaJavadoc
    following the multiplatform configuration specified here https://kotlin.github.io/dokka/1.6.0/user_guide/gradle/usage/#multiplatform but the following error:
    Pre-generation validity check failed: Dokka Javadoc plugin currently does not support generating documentation for multiplatform project. Please, adjust your configuration
    Is this a known defect?
    m
    6 replies · 2 participants
  • a

    Anton Yalyshev [JB]

    12/06/2021, 5:19 PM
    Hey folks! I’m Anton from Dokka team. Two weeks ago we released 1.6 version of Dokka. And I would like to talk with those who have already tried 1.6 version about new experience. Especially about the new HTML output format. We’re on the way of making Dokka stable, and your opinions what should be changed/improved/fixed are extremely helpful! Leave 🏎️ reaction and I’ll contact you soon for arranging call or talking about 1.6 experience in DM
    🏎️ 9
    j
    1 reply · 2 participants
  • m

    mikehearn

    12/08/2021, 6:57 PM
    I've got multi-module docs generating and it looks swish, but: 1. Does anyone know if it's possible to apply custom CSS e.g. to change the logo image? 2. The sidebar doesn't seem to be used for anything anymore. It's always blank. What's meant to go there?
    m
    3 replies · 2 participants
  • m

    mikehearn

    12/08/2021, 7:10 PM
    Is there a hotkey to trigger search?
    m
    2 replies · 2 participants
  • a

    Amie Cilerp

    12/11/2021, 4:36 PM
    Hi, are there any plans to use Dokka to format official API references, e.g. https://kotlinlang.org/api/latest/jvm/stdlib/? And if so, by when (and where)?
    i
    1 reply · 2 participants
  • s

    Skolson5903

    12/13/2021, 10:46 PM
    Attempting to use the 1.6.0 plugin and task dokkaHtml in a multiplatform library project. Using a clause like this in build.gradle.kts:
    dokkaHtml {
            moduleName.set("Anything")
            dokkaSourceSets {
                named("commonMain") {
                    noAndroidSdkLink.set(false)
                }
            }
            dependencies {
                dokkaHtmlPlugin("org.jetbrains.dokka:kotlin-as-java-plugin:1.6.0")
            }
        }
    and running dokkaHtml gradle task gets:
    > Task :kmp-sc:dokkaHtml FAILED
    
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Execution failed for task ':kmp-sc:dokkaHtml'.
    > org/jetbrains/dokka/model/ExtraModifiers$KotlinOnlyModifiers$Value
    The github doc doesn't mention other dependencies to include explicitly, but since the only error shows a class name with no error cause, I can't tell if this is a dependency issue or not. Anyone else seen this or know what I'm doing wrong?
    m
    r
    13 replies · 3 participants
  • r

    Rescribet

    01/04/2022, 10:10 PM
    Is there any way to show each field in a (data) class on a separate line? The current everything on a single line seems a bit cluttered
    ➕ 1
    i
    3 replies · 2 participants
  • m

    Michael Limb

    01/05/2022, 6:57 PM
    Hi there! I'm using Dokka for my kotlin documentation, along with a sort of "readme" in a
    module.md
    file. I know that the module documentation supports markdown, but is there any way to add a table of contents that anyone has had any success with? Seems like I've tried everything and can't get anything to work.
    i
    4 replies · 2 participants
  • u

    Utkarsh Tiwari

    01/11/2022, 12:31 PM
    Hi, I am trying to publish a module named
    core_ds_component
    of an Android project to artifactory. When I run the publish command, I get this error. I couldn’t find dokka in the dependency graph of this module. Does anyone has any idea what could be wrong?
    m
    2 replies · 2 participants
  • a

    Anton Afanasev

    01/11/2022, 4:03 PM
    Hi, want to get your opinion about documentation best practices with multiplatform code. Do you document both expect/actual classes? If yes, do you document functions in expect/actual as well? Also, are there any common styling/best practices you are aware of? Note. By documenting, I mean kdoc.
    z
    5 replies · 2 participants
  • i

    Ignat Beresnev

    01/12/2022, 5:45 PM
    JFYI: it seems like gradle plugin portal is experiencing partial outage (https://status.gradle.com/) and older versions of dokka might be affected. Some users report that versions
    1.5.X
    are missing, but
    1.6.X
    are available, probably stored on different nodes or something. Good time to update? 😅
    v
    m
    4 replies · 3 participants
  • j

    Jakob K

    01/13/2022, 5:36 PM
    What would be the best extension point for simply adding additional top level markdown files?
    v
    j
    5 replies · 3 participants
  • m

    Michael Limb

    01/13/2022, 8:50 PM
    Is there an easy way to be able to refer to specific classes and methods in the documentation through a link in the
    module.md
    documentation without putting the full url each time? for example: Instead of:
    Refer to the documentation for the [Resource](<http://localhost:8080/core/com.example.core/-resource/index.html>) class.
    Something like:
    Refer to the documentation for the [Resource] class.
    v
    2 replies · 2 participants
  • g

    Gabriele Cacchioni

    01/17/2022, 9:08 AM
    Hello all 👋 I’m really struggling with generating Dokka docs for a multimodule maven project. I’ve found
    Dokka Maven plugin does not support multi-platform projects.
    on the docs, does this mean it’s not yet supported? If so, is there any workaround for generating the docs for the modules and merge them together?
    j
    i
    +1
    6 replies · 4 participants
  • d

    DJ

    01/23/2022, 1:47 AM
    I'm trying to figure out the correct way to use dokka in a gradle composite build. My main gradle project has no subprojects (only included builds) so the MultiProject tasks aren't added by default and I create them manually. However I am now stuck on trying to figure out the correct way to add the child/partial tasks to childDokkaTasks. Any help would be appreciated!
    j
    3 replies · 2 participants
  • b

    bobby

    01/25/2022, 6:40 AM
    hi everyone, it’s my first time using Dokka in my project, so I had some questions regarding that. My project implementing multi-module 1. is there someway for me to exclude certain package in a module? let say I had package
    b
    c
    d
    in module
    a
    , I want to exclude
    b
    and
    c
    so it won’t generated. Excluding certain module is working fine 2. if you see the attach image, you can find some functions. the problem is, I’m not implement any of those function explicitly in my class (in this case
    CameraMaskingActivity
    ). Moreover, I found these functions also included in other class. I don’t want this in my report, is there anyway to exclude or remove this? 3. The report folder is big, like really big, I only include 2 modules but the size already 300++mb, is there someway to reduce the size? I know it might be related to each class that bloated, but the report file size could related to my question number 2 4. (Regarding design) in the attached image, I don’t find navigation menu that on the left, for me to go to other class in the report file, at least in the same module, is there any implementation that I’m not implement? Thank you and sorry for asking a lot of question. Cool library btw. Have a great day 😄
    i
    10 replies · 2 participants
  • d

    DJ

    01/25/2022, 10:06 PM
    I'm interested in adding opengraph (https://ogp.me/) support to dokka. I have the following 2 questions: 1. Is there an existing extension point a plugin could use to implement this? If not, would you consider adding one that allows this and similar things to be implemented as plugins? 2. Would this be a feature that you are interested in having in dokka? If so I would be willing to develop it as a PR to dokka.
    i
    3 replies · 2 participants
  • j

    Justin (Midas) Gilman

    01/26/2022, 7:42 PM
    Also, I see a plugin
    all-modules-page-plugin
    in the Dokka repository but I can't find any documentation on how to properly configure Dokka to use this
    d
    3 replies · 2 participants
  • j

    Justin (Midas) Gilman

    02/02/2022, 4:44 PM
    I want to use
    @sample
    to reference some example code and I cannot get it to work. I'm looking at https://github.com/JetBrains/kotlin/blob/bd4d8479430a3ebda030ce4856886e9985cacd75/libraries/stdlib/src/kotlin/collections/Iterators.kt#L8 as an example but I can't figure out how to make it work.
    p
    i
    4 replies · 3 participants
  • p

    perry

    02/04/2022, 4:19 PM
    Hoping to get some troubleshooting tips. Trying to use dokka for a multi-module gradle project (with both java and kotlin sourcesets), and some projects are failing with the following error (full stacktrace in thread):
    java.lang.ClassCastException: class com.intellij.psi.PsiArrayType cannot be cast to class com.intellij.psi.impl.source.PsiClassReferenceType (com.intellij.psi.PsiArrayType and com.intellij.psi.impl.source.PsiClassReferenceType are in unnamed module of loader java.net.URLClassLoader @7dcea628)
    Gradle version: 7.3.3 kotin/dokka plugin version: 1.5.31 and 1.6.10 (tried upgrading, same result on both) jdk: 11.0.13 platform: Intel Mac
    i
    6 replies · 2 participants
  • f

    Felix Honer

    02/06/2022, 12:27 PM
    Hi all, I’m trying to generate JSON files in order to feed spring-auto-restdocs, which is still using dokka v0.10.1 at the moment. I’m a bit lost in dokka’s plugin model, maybe someone of you can help: is it possible to generate files in pure JSON format with the currently existing extension points? if yes, what would be needed to do so?
    i
    5 replies · 2 participants
  • b

    Bradleycorn

    02/07/2022, 9:06 PM
    I’ve got an Android project, and docs are being generated, but they do not contain source links? I think I have dokka configured correctly, so I’m not sure what’s going on. Any ideas? I’m using 1.6.10. Here’s my config for Gfm:
    tasks.dokkaGfm {
        moduleName.set("app")
        outputDirectory.set(projectDir.resolve("../docs"))
        suppressObviousFunctions.set(true)
    
        dokkaSourceSets {
            configureEach {
               displayName.set("app")
    
                sourceLink {
                    // Unix based directory relative path to the root of the project (where you execute gradle respectively).
                    localDirectory.set(file("src/main/kotlin"))
    
                    // URL showing where the source code can be accessed through the web browser
                    remoteUrl.set(URL("<https://github.com/bradleycorn/resume-android/blob/master/app/src/main/kotlin>"))
                    // Suffix which is used to append the line number to the URL. Use #L for GitHub
                    remoteLineSuffix.set("#L")
                }
            }
        }
    }
    p
    v
    3 replies · 3 participants
  • g

    Grégory Lureau

    02/18/2022, 10:24 AM
    Hello! As github is now officially supporting mermaid, I assume there will be more and more of mermaid graphs in the documentation. Is there a plan to support it in Dokka? Could be really great for us.
    ➕ 6
    i
    h
    +1
    6 replies · 4 participants
  • d

    DJ

    02/21/2022, 10:30 PM
    It looks like dokka html docs are missing the
    <!DOCTYPE html>
    tag, which is required for browsers to use standard mode for rendering documents. Is this just a mistake or does dokka intentionally use quirks mode? If this is a bug, should I open an issue/pull request for it?
    👍 1
    i
    3 replies · 2 participants
  • u

    uli

    02/24/2022, 5:40 PM
    Hi, could some one help out with a simple question? If I want to document
    interface MySDK {
    and I have a global factory method
    fun MySdk()
    how do I refernce the method from the interface KDoc? The obvious approach is ambigouos and dokka chooses to resolves to the interface, not the method.
    /**
     * An implementation of this interface can be instantiated by calling the factory method [MySdk]()
     */
    🤔 1
    i
    r
    +1
    5 replies · 4 participants
  • m

    mikehearn

    03/11/2022, 5:29 PM
    Hey, does anyone know why KDoc in the latest IDE plugin doesn't seem to recognize constructor parameters in class docs when used as links, but does in
    @param
    tags?
    i
    2 replies · 2 participants
  • g

    Grégory Lureau

    03/15/2022, 11:22 AM
    Hello! I've just released a Mermaid plugin for Dokka. It's drawing images via mermaid.js (embedded) in comment blocks. Feel free to open issues with ideas or bugs you found. https://github.com/glureau/dokka-mermaid
    👍 7
    ⭐ 7
    i
    2 replies · 2 participants
  • m

    mkrussel

    03/16/2022, 10:27 PM
    It's a little frustrating that the documentation for Gradle configuration shows
    includeNonPublic
    as deprecated in favor of
    documentedVisibilities
    when
    documentedVisibilities
    has not been released in the version the documentation is saying to use.
    i
    2 replies · 2 participants
  • t

    thunderbiscuit

    04/01/2022, 4:39 PM
    Hi there! I don’t know what I changed but for some reason my dokkaHtml docs have started building using the older dokka style/theme. Our library used to always build nicely using the more modern theme… is there a configuration for turning this on/off? _Edit_: ok it’s somehow related to my upgrade of the Android Gradle plugin. the
    7.0.4
    builds the latest theme of Dokka and the
    7.1.2
    builds the old version.
    🤔 1
    👀 1
    i
    1 reply · 2 participants
  • g

    Grégory Lureau

    04/07/2022, 10:48 PM
    Hi! I was playing around with KSP and Mermaid, thinking that I could generate the relationship graphs of classes (mainly public classes/fields that are visible in the API, ignoring technical details). Is there an existing tool doing the same kind of stuff that could be integrated with Dokka ? If not, knowing that Mermaid can handle clicks, maybe we could have a more visual way to navigate documentation ?
    👀 1
    :nice: 5
    a
    l
    +2
    11 replies · 5 participants
Powered by Linen
Title
g

Grégory Lureau

04/07/2022, 10:48 PM
Hi! I was playing around with KSP and Mermaid, thinking that I could generate the relationship graphs of classes (mainly public classes/fields that are visible in the API, ignoring technical details). Is there an existing tool doing the same kind of stuff that could be integrated with Dokka ? If not, knowing that Mermaid can handle clicks, maybe we could have a more visual way to navigate documentation ?
👀 1
:nice: 5
a

AJ Alt

04/11/2022, 9:23 PM
It's not integrated with Dokka, but IntelliJ can generate class diagrams like that: https://www.jetbrains.com/help/idea/class-diagram.html
g

Grégory Lureau

04/11/2022, 9:32 PM
Oh thanks, I didn't know about that tool. Looks like it's only for ultimate (and sadly I've only the community edition). Are you using it and is happy with it? Do you produces some diagram that are used for a html documentation?
What I'd love is something that is automatically generated from code (low maintenance), with a doc accessible from IDE and outside IDE (for our external clients, so probably html). And something better again could be a sequence diagram of our integration test "traces" (like all calls that have been done), so that a GWT business is illustrated by a clear list of calls. And if I can navigate from class diagram to sequence diagram to code/public documentation, then it's awesome. Not sure how to achieve the traces (especially in a KMP project) but I'll definitely try something. Please don't hesitate to share your ideas/inputs.
l

Lukas K-G

04/14/2022, 4:39 AM
Hi @Grégory Lureau I really like your idea. Do you mind sharing the code you used to generate the diagram?
g

Grégory Lureau

04/14/2022, 7:15 AM
Sure, here it is https://github.com/glureau/MermaidKsp Parsing to my "domain classes" looks ok so far (only dealing with classes), I've made the rendering a bit configurable. I plan to generate a diagram by package and maybe even by classes, so that it can be included in the Dokka documentation (with this one). What do you want to achieve?
l

Lukas K-G

04/14/2022, 7:17 AM
Thanks a lot! I was always intrigued by KSP and never got a chance to look at it. This use case looks very promising for automatically generating nice class diagrams, especially now that github supports mermaid this would be super useful. Having this in dokka similar to what you described would be even better though.
❤️ 1
g

Grégory Lureau

04/14/2022, 7:32 AM
The code could be adapted with a gradle plugin to generate a graph/markdown from a specific annotation on the class, so that it's generating on demand. I'm just a bit sad that we cannot include a markdown in another markdown (at least not in IntelliJ, and I think not in github). But having a file automatically generated and overriding at each generation in the src/ (to be committed easily) could still be good enough for most use cases I presume.
👍 1
Now generating markdowns for packages and modules. A couple of gradle lines and it's auto-imported in Dokka. 🎉
🔥 2
i

Ignat Beresnev

04/15/2022, 8:20 AM
Looks really cool :) Good job
h

hfhbd

04/15/2022, 9:59 AM
nice, did you publish the docs online?
g

Grégory Lureau

04/15/2022, 10:01 AM
Not yet, I still have some finetuning to do (internal classes are visible in the 2nd screenshots but are not displayed by Dokka for example). Also the project I'm working on is closed-source so I won't be able to share it. But if you know an open-source project that could benefits from that, it could be a good showcase of the tools.
View count: 7