Blog Infos
Author
Published
Topics
,
Published
Topics
,

dokka simple workflowWorkflow of dokka [made with canva]

What is code documentation?
Why should we document code?
Lazy documentation
OverInfo Documentation
Good documentation characteristics
What are KDoc and Dokka?
KDoc
Dokka
How to implement
1. Implement dependencies in project-level build.gradle
plugins { id ‘org.jetbrains.dokka’ version ‘1.7.0’ apply false}
2. Implement dependencies in module-level build.gradle
plugins { id 'org.jetbrains.dokka' }

 

Job Offers

Job Offers


    Senior Android Engineer

    Carly Solutions GmbH
    Munich
    • Full Time
    apply now

    Senior Android Developer

    SumUp
    Berlin
    • Full Time
    apply now

OUR VIDEO RECOMMENDATION

No results found.

Jobs

3. Document Generation
./gradlew dokkaHtml
./gradlew dokkaHtmlMultiModule

Once it completes the process you can see the generated document in build/dokka by changing the view type from Android to Project. Here is a sample dokka build generated in open source project Sliderz.

 

dokka view in android studio

Project view of sliderz project

 

And by clicking the index.html and opening the browser we can see the code documentation generate in HTML format which is the default format.

 

sample doc html type

Documentation of Sliderz

 

Kdoc Commenting
/** and press enter
**/
fun foo(parameter){ }
Remainder
Sample Kdoc commenting example

This article was originally published on proandroiddev.com

YOU MAY BE INTERESTED IN

YOU MAY BE INTERESTED IN

blog
We all know that “Good code documents itself” but documenting your code won’t hurt…
READ MORE

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.

Menu