https://kotlinlang.org logo
#dokka
Title
# dokka
s

snowe

03/05/2024, 7:15 PM
I’ve been trying to figure out how to build the kotlin api docs from source. I’ve gotten far enough that I’m generating the html files, but they all have comments indicating that the generation isn’t complete.
Copy code
<!--[+]cmd:{"@class":"org.jetbrains.dokka.base.templating.PathToRootSubstitutionCommand","pattern":"###","default":""}-->
What I did to get to this point: At the root I ran
./gradle install
Then in
libraries/tools/kotlin-stdlib-docs
I ran
./gradlew kotlin-stdlib_2.0_latest
and
./gradlew kotlin-reflect_2.0_latest
, which generated the docs to the
kotlin-stdlib-docs/build/doc/partial/latest
directory. I noted that this is a ‘partial’ so I tried using
./gradlew dokkaHtmlCollector
both from the root of the kotlin repo and also from the
kotlin-stdlib-docs
folder, both of which failed with errors. I can’t find any documentation in the repo about how this is generated, nor can I find any references to this module at all, even though it is clearly what is building the docs… I’ve also tried building the kotlin-web-site repo, but that seems to only be the css and js and images, not the api docs. Anyone know what I could be doing wrong here?
v

Vadim Mishenev

03/06/2024, 11:02 PM
./gradlew kotlin-stdlib_2.0_latest
and
./gradlew kotlin-reflect_2.0_latest
are partial tasks of Dokka. To have the completed documentation, you need to run
all-libs_2.0_latest
that aggregate the partial documentation of stdlib, reflect and test libraries. Originally with the kotlin-stdlib-docs script you can not generate separate documentation for a particular library. Otherwise, the build script should be edited a little. cc @ilya.gorbunov