Kotlin - turning kdoc into html

snotnose

Ars Praefectus
3,007
Subscriptor
The dumbest effing things cause progress to slam to a halt. System is Win11, IntelliJ. I'm writing Kotlin and am trying to generate the html files from my kdocs. All google wants to show me is how to add /**, @parameter, @Return, etc to my files. I know all that. What google won't show me is how to get html files from my markup.

I've tried a couple different kdoc tools (KDoc-er, KdocGen, kdoc-generator) from the marketplace, none of them seem to generate the html.

So, wise wizards, what are the magic herbs I need to toss into IntelliJ's pot and the incantation I recite to get some tasty html out?
 
Last edited:

snotnose

Ars Praefectus
3,007
Subscriptor
That looks like an Android thing. I'm not on Android.

The webpage says to modify gradle or maven scripts to install it. The only gradle script I have is for an Android project I did just to ensure my setup was OK. I'm doing Kotlin and Swing for a desktop.

Also don't see any dokka stuff in the IntelliJ plugins marketplace.
 
Last edited:

tb12939

Ars Tribunus Militum
1,844
That looks like an Android thing. I'm not on Android.

The webpage says to modify gradle or maven scripts to install it. The only gradle script I have is for an Android project I did just to ensure my setup was OK. I'm doing Kotlin and Swing for a desktop.

Also don't see any dokka stuff in the IntelliJ plugins marketplace.
Dokka can be used from the command line -
java -jar dokka-cli-2.0.0.jar \
-pluginsClasspath "./dokka-base-2.0.0.jar;./analysis-kotlin-descriptors-2.0.0.jar;./kotlinx-html-jvm-0.8.0.jar;./freemarker-2.3.31.jar" \
-sourceSet "-src /home/myCoolProject/src/main/kotlin" \
-outputDir "./dokka/html"
- but I'm not sure why you'd do that more than once. Surely you're using some build tool?