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

There are currently no vacancies.

OUR VIDEO RECOMMENDATION

, ,

Migrating to Jetpack Compose – an interop love story

Most of you are familiar with Jetpack Compose and its benefits. If you’re able to start anew and create a Compose-only app, you’re on the right track. But this talk might not be for you…
Watch Video

Migrating to Jetpack Compose - an interop love story

Simona Milanovic
Android DevRel Engineer for Jetpack Compose
Google

Migrating to Jetpack Compose - an interop love story

Simona Milanovic
Android DevRel Engin ...
Google

Migrating to Jetpack Compose - an interop love story

Simona Milanovic
Android DevRel Engineer f ...
Google

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