https://kotlinlang.org logo
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
  • a

    AJ Alt

    12/15/2020, 6:18 PM
    Has anyone got asset customization for
    dokkaHtml
    to work? Following the docs (https://kotlin.github.io/dokka/1.4.20/user_guide/gradle/usage/#applying-plugins), I tried this in my build.kts:
    plugins { id("org.jetbrains.dokka") version "1.4.20" }
    tasks.dokkaHtml {
        pluginConfiguration<DokkaBase, DokkaBaseConfiguration> {
            customStyleSheets = listOf(file("my-stylesheet.css"))
        }
    }
    But
    DokkaBase
    and
    DokkaBaseConfiguration
    don't resolve. Are the docs wrong, or am I misunderstanding them?
    m
    k
    • 3
    • 5
  • c

    Christian Sousa

    12/23/2020, 3:16 PM
    Hello guys! Is there any way of changing the copyright created by Dokka? I’ve seen some people talk about creating a plugin for that. Is there any thing so I can take a look into? Because the documentation about that is not that clear
    m
    k
    • 3
    • 3
  • g

    Gus

    01/07/2021, 11:32 AM
    Hey folks. I'm using the latest version of Dokka. How can I override the messages on the footer in the HTML output? Thanks
    m
    • 2
    • 4
  • j

    Julia Solonar

    01/08/2021, 1:22 PM
    Hi guys, Is there a way to get from
    DClass
    the list of child classes `DRI`(List of classes which extended current class)? And for
    DFunction
    get the method
    DRI
    , which was override by current method. So If I have class :
    class Fruit{
     fun grow()
    }
    
    class Apple: Fruit{
     override fun grow()
    }
    So, from
    DClass
    of
    Fruit
    I want to get info, that it was extended by
    Apple
    . And from
    DFunction
    of
    Apple.grow()
    that it overrode
    Fruit.grow()
    .
    m
    • 2
    • 2
  • m

    Matthew Burnard

    01/12/2021, 6:00 AM
    Howdy folks, is there a way to validate a [module | project]’s KDocs? I’ve integrated dokka and am running it on jenkins as a nightly job but would like to ensure changes to a module will not break dokkaGfm on the next cycle
    m
    • 2
    • 3
  • h

    Harald Pehl

    01/12/2021, 6:24 AM
    Hi guys, it there any way to generate a version number into the KDoc output?
    m
    • 2
    • 1
  • m

    mikehearn

    01/12/2021, 3:08 PM
    Does Dokka use Dokka to document its own API anywhere?
    m
    • 2
    • 2
  • e

    elect

    01/14/2021, 6:37 PM
    also, is there a programmatic way to skip dokka completely (for example on CI)?
    a
    b
    • 3
    • 13
  • m

    Mike Hall

    01/19/2021, 10:03 AM
    If you need examples of my Gradle files or any other details, please ask, I'm not sure what exactly you would want and I don't want to start spamming the channel with unnecessary clutter.
    k
    • 2
    • 27
  • e

    elect

    02/01/2021, 2:28 PM
    According to @Kamil Doległo
    withJavadocJar()
    packs the output of the
    javadoc
    task, so you can override this task and run dokka inside
    How may I do that?
    k
    l
    • 3
    • 5
  • e

    elect

    02/03/2021, 11:38 AM
    I read on the readme that dokka isnt on the portal, but I can import and use it anyways without the
    settings.gradle.kts
    suggested modification how can it be?
    k
    • 2
    • 2
  • a

    António Bastião

    02/03/2021, 12:02 PM
    I’ve to make an update to my previous message. I’ve found the page that shows how to create a plugin, but I don’t necessarily understand what’s written there and the code has a bit lack of documentation. Which is ironic since is a tool to create documentation. Is there any tutorial for noobs? Create documentation as JSON is quite important to me because I’ve a way to post the documentation from CI pipeline or create HTML documentation and upload manually. I would like to avoid the second one and maybe the plugin, if can manage to create it might be useful to other people too.
    m
    k
    f
    • 4
    • 15
  • l

    Lukas K-G

    02/04/2021, 10:22 AM
    We are getting a few errors when generating documentation for some special java classes. This is all confined within one package which I would like to exclude from documenting entirely. I tried excluding it using
    perPackageOption
    but the exception still occurs. I got it to work by “avoiding” the folder by adding all folders but this one to
    sourceRoots
    but this is very tedious as I need to list all manually. Is there a way to exclude a folder from dokka completely?
    ✅ 1
    m
    k
    • 3
    • 24
  • m

    Michal Klimczak

    02/04/2021, 11:09 AM
    I'm trying to use the latest dokka to create javadocs in a multipaltform project. It's a jvm+ios project. But I get
    Pre-generation validity check failed: Dokka Javadoc plugin currently does not support generating documentation for multiplatform project. Please, adjust your configuration
    I was hoping that this config would work, but it doesn't
    tasks {
        dokkaJavadoc {
            outputDirectory.set(project.rootProject.file("$buildDir/dokka"))
            dokkaSourceSets {
                named("commonMain") {
                    sourceRoots.from(kotlin.sourceSets.getByName("commonMain").kotlin.srcDirs)
                }
            }
        }
    }
    m
    k
    • 3
    • 12
  • e

    elect

    02/04/2021, 11:57 AM
    it seems that under
    buildSrc
    the lambda passed on each
    dokkaSourceSets
    doesnt get executed
    dokkaHtml {
            val f = File("$rootDir/src/main/kotlin")
            println(f)
            dokkaSourceSets.configureEach {
                println("in")
                println(sourceLinks)
                sourceLink {
                    localDirectory.set(f)
                    println(localDirectory)
                    remoteUrl.set(URL("<https://github.com/kotlin-graphics/kotlin-unsigned/tree/master/src/main/kotlin>"))
                    remoteLineSuffix.set("#L")
                }
            }
    //        finalizedBy(netlifyBadge)
        }
    g
    • 2
    • 1
  • z

    zsmb

    02/10/2021, 12:54 PM
    I’m trying to generate Dokka documentation for an Android project with custom Views, and the supertype’s declarations being dumped into the docs make them completely unusable at the moment 😞
    View
    and
    ViewGroup
    have their own documentation on the Android Developer website, there’s no need to show their hundreds of methods in our docs. Our custom methods are essentially impossible to find this way. I found an already open issue for this with no responses https://github.com/Kotlin/dokka/issues/1501 Any chance that this will be addressed soon, or is there any workaround to this problem?
    🤩 1
    ✅ 2
    l
    • 2
    • 29
  • n

    napperley

    02/11/2021, 10:06 PM
    The Dokka Gradle plugin has some dependencies that aren't available on Maven Central, what is being done to resolve the problem?
    j
    m
    • 3
    • 2
  • n

    napperley

    02/12/2021, 12:04 AM
    Is there a workaround for getting the Dokka JavaDoc plugin to work with a Kotlin Multiplatform project? Below is the error message:
    Pre-generation validity check failed: Dokka Javadoc plugin currently does not support generating documentation for multiplatform project.
    m
    • 2
    • 2
  • l

    Lee McLaughlin

    02/15/2021, 9:14 PM
    dokkaHtml {
    
            outputDirectory.set(new File(buildDir, "docs/htmldocs"))
    
            dokkaSourceSets {
                named("main") {
                    includeNonPublic.set(false)
                    // Emit warnings about not documented members. Applies globally, also can be overridden by packageOptions
                    reportUndocumented.set(true)
    
                    packageOptions {
                        prefix.set("health.waire.sdk.cdetect.internal")
                        // will match health.waire.sdk.cdetect.internal.bluetooth and all sub-packages of it
                        suppress.set(true)
                    }
                    // Allows to customize documentation generation options on a per-package basis
                    // Repeat for multiple packageOptions
                    perPackageOption {
                        prefix.set("health.waire.sdk.cdetect.internal") // will match kotlin and all sub-packages of it
                        suppress.set(true)
                    }
                }
    
            }
    
        }
    m
    • 2
    • 2
  • z

    Zac Sweers

    02/24/2021, 7:52 AM
    hi folks - fyi that jetbrains uploaded a new, JDK 11-only version of
    org.jetbrains:markdown
    (which dokka depends on) to maven central yesterday with the same version that's on jcenter. If you haven't set up your repo to only source it from jcenter, your builds will almost certainly break imminently if you don't have a cached version of the dep local. Easy way to test is
    ./gradlew help --refresh-dependencies
    l
    m
    k
    • 4
    • 13
  • z

    zsmb

    02/24/2021, 8:36 AM
    On another similar note, the Space repo serving the dev versions is down, throwing this error
    Packages monthly outgoing traffic limit of 250.0 GB exceeded
    https://maven.pkg.jetbrains.space/kotlin/p/dokka/dev/org/jetbrains/dokka/dokka-gradle-plugin
    😔 2
    m
    • 2
    • 2
  • e

    elect

    02/25/2021, 3:48 PM
    it seems like
    org.jetbrains.dokka:javadoc-plugin:1.4.20
    depends on
    com.soywiz.korlibs.korte:korte-jvm:1.10.3
    which can be found only on jcenter. And this is a problem since thas is gonna be closed soon Any alternatives?
    m
    d
    • 3
    • 12
  • p

    Paul Woitaschek

    03/01/2021, 2:57 PM
    Am I missing something with dokka? I'm using it on a multiplatform multi module project and the left bar is always completely empty. Also there is no linking to classes that are declared in a different module. Also the module description is not included.
    m
    • 2
    • 1
  • e

    eygraber

    03/02/2021, 6:10 AM
    The documentation at https://kotlin.github.io/dokka/1.4.20/user_guide/gradle/usage/#configuration-options says to use the following to specify the output directory:
    outputDirectory.set(buildDir.resolve("dokka"))
    But I keep getting an error using Gradle 6.8.3:
    A problem occurred configuring project ':common'.
    > Could not create task ':common:androidJavadocsJar'.
       > Could not create task of type 'AndroidJavadocsJar'.
          > Could not create task ':common:dokkaHtml'.
             > No signature of method: java.io.File.resolve() is applicable for argument types: (String) values: [dokka]
    l
    m
    • 3
    • 4
  • d

    Drew Hamilton

    03/02/2021, 2:47 PM
    I’m trying to get a generated .kt file to show up in the
    dokkaHtml
    output for my Gradle Android library module and I can’t get it to work. The file is generated in
    build/generated/source/myDir/main
    , is added to
    android.sourceSets.main.java.srcDirs
    , and is used in source code which successfully compiles. I’ve tried a bunch of different permutations of configuration that looks like this:
    dokkaHtml {
        dokkaSourceSets {
            configureEach {
                jdkVersion.set 8
    
                logger.lifecycle "$project adding sourceRoot $myDirRoot"
                sourceRoot.from(file(stringsRoot))
            }
        }
    }
    With this exact configuration,
    :myModule:dokkaHtml
    fails due to “> NamedDomainObjectContainer#create(String) on GradleDokkaSourceSetBuilder container cannot be executed in the current context.” If I use
    sourceRoot(
    (without the
    .from
    ), it doesn’t fail, but the generated class still doesn’t appear in the docs. I’ve also tried adding it as a custom source set or setting
    myDirRoot
    as an absolute or relative path, to no avail. Any clue what I’m doing wrong?
    m
    a
    • 3
    • 6
  • a

    AJ Alt

    03/04/2021, 5:44 PM
    In the Dokka 1.4.20, is there a way to disable the "On This Page" tab in the html output? It covers up the scroll bar, and there's already a table of contents in the side panel with the same links.
    k
    • 2
    • 2
  • t

    Tobi

    03/12/2021, 11:57 AM
    Hello. I am trying (for the first time) to use
    Dokka 1.4.20
    to generate a JavaDoc artifact for my Kotlin based Android library. The basic setup I added is:
    apply plugin: "org.jetbrains.dokka"
    
    // ...
    
    task javadocJar(type: Jar, dependsOn: dokkaJavadoc) {
        group "publishing"
        description "Generates javadocJar based on Dokka"
        archiveClassifier.set("javadoc")
        from dokkaJavadoc.outputDirectory
    }
    
    dokkaJavadoc.configure {
        moduleName.set("Roadsigns")
        dokkaSourceSets {
            named("main") {
                sourceLink {
                    localDirectory.set(file("roadsigns/src/main/kotlin"))
                    remoteUrl.set(java.net.URL("<https://github.com/Umweltzone/roadsigns/blob/master/roadsigns/src/main/kotlin>"))
                    remoteLineSuffix.set("#L")
                }
            }
        }
    }
    See the full configuration on this
    dokka
    branch: https://github.com/Umweltzone/roadsigns/blob/dokka/gradle/deploy.gradle#L69-L87 ▶️ I noticed that links to the GitHub sources and to the Android or Kotlin documentation are not present (see screenshot). My understand is that
    noAndroidSdkLink
    is disabled by default - meaning: if I do not configure it then there should be links to Android docs. What do I have to configure to generate them?
    k
    • 2
    • 4
  • m

    marco.lied

    03/15/2021, 9:38 AM
    Hi, I have an issue with the latest dokka (
    1.4.20
    ), which I try to migrate our
    0.9.18
    setup to: The
    includes
    are not used like in the old dokka before. We have a
    README.md
    with the
    # Module <module-name>
    tag but the
    README.md
    seems not to be parsed and added tot the dokka outout. No matter if I use
    includes.setFrom(files("README.md"))
    or
    includes.from(files("README.md"))
    Can I somehow trace if the
    README.md
    is used correctly?
    --debug
    does not report any meaningful information here
    s
    k
    m
    • 4
    • 27
  • l

    Lukas K-G

    03/16/2021, 6:59 AM
    I don’t want to steal dokka officials their thunder but I am so hyped that version
    1.4.30
    is release. 🎉 So much nice stuff in there.
    🎉 3
    c
    • 2
    • 3
  • z

    zsmb

    03/16/2021, 8:15 AM
    MavenCentral has it https://search.maven.org/artifact/org.jetbrains.dokka/dokka-gradle-plugin/1.4.30/jar
    a
    • 2
    • 2
Powered by Linen
Title
z

zsmb

03/16/2021, 8:15 AM
MavenCentral has it https://search.maven.org/artifact/org.jetbrains.dokka/dokka-gradle-plugin/1.4.30/jar
a

audriusk

03/16/2021, 9:23 AM
This is different module... Not a gradle plugin. Gradle plugin should be named
org.jetbrains.dokka.gradle.plugin
and exist at https://search.maven.org/artifact/org.jetbrains.dokka/org.jetbrains.dokka.gradle.plugin/1.4.30/jar
z

zsmb

03/16/2021, 9:27 AM
Not sure why these both exist, we use the one I linked, and that’s what’s mentioned in the Dokka documentation as well https://kotlin.github.io/dokka/1.4.30/user_guide/gradle/usage/
View count: 4