Reading Time: 2 minutes

Recently, the Kotlin Development team has released an alpha version of the Dokka documentation engine. The Kotlin 1.4 is the latest stable version release of the Kotlin compiler. The new Kotlin slack release would focus on reducing the amount of configuration required to use Dokka in several cases. It adds Kotlin multiplatform projects which help in spending less time writing Dokka and devote time to write Kotlin documentation.

After Kotlin app developers release the Dokka on Kotlin 1.4.0 version, the parts were redesigned into several parts from scratch. It comes with several features like HTML format, pluggability, and multimodule projects. With this, the feedback value increases from bug fixes to better source set in multiplatform projects. Let’s understand how Kotlin 1.4 incorporated its release.

Kotlin 1.4 Released Features

Kotlin 1.4 Released Features

Simplified Gradle Plugin

Using the Dokka version, one can make the Gradle plugin easily and use it by supporting advanced configuration which powers users. With this plugin, one can generate documentation that does not require manual configuration for most projects. One can add the Gradle plugin as it’s enough to cover all cases of build.gradle.kts:

Plugins {
Id(“HELLO”) version “1.4.0.”
}

Multiplatform

It’s a default configuration that we have introduced in the previous section which works on multiplatform projects. One has to apply the Dokka Gradle plugin and all platform-specific sets to synchronized automatically using the model. Also, there’s no need to register additional source sets in Dokka as it comes with redundant data which can remove configuration files easily. The Kotlin app developers are looking for a way to merge multiple sources.

Merging Source Sets

Dokka serves as an easy and quick way to filter documentation using APIs available for a specific target. But if you’re working on a project with a lot of sets then using Kotlin multiplatform works great. In the previous version, there was a complicated configuration that comes in a single bubble and turns unnecessary complexity in the project build files.

Kotlin projects demonstrate a significant need for grouping functionality which has been introduced vastly in the simplified mechanism. As the sets represent the same platform as common, JVM, native, and JS, it comes with displayName that’s merged with the same bubble. After regenerating the documentation, we’ll get a concise source setlist under Bubbles:

Kotlinx-coroutines-core

Compatibility and Stability Notes

Make it clear that Dokka is an Alpha release for Kotlin 1.4.0. Here, Gradle Plugin APIs are subject to change in Dokka releases. It is integrated more tightly with the Gradle plugin. Now facilitate a new integration mechanism while switching towards Gradle’s new property APIs and Gradle’s new provider. With this, we can assign value to properties using .set() instead of =.

Example:
jdkVersion.set(7)

If you’re looking for detailed overview changes, then check in the configuration DSL awaited by replacement string-based APIs using java.io.File based APIs.

Also Read: Is Kotlin Better Option for Android App Development?

How to Get Started

We have to use the newest version of Dokka in your project and add the corresponding plugin directive to top with using build.gradle(.kts) file:
Check the below example:

Plugins {
Id(“Hello”) version “1.4.0.”
}

Concluding

Hope the above pointer helped in understanding the concept. If you’re still facing the issues, then join the official conversion at Kotlin Slack in the Dokka channel. Hire Kotlin app developers to get better results. Kotlin supports multiplatform and reduces the time spent writing and maintaining the same code for different platforms. Get benefits and flexibility by using native programming languages.

 

 

Kotlin 1.4 Release Update By Dokka Alpha

Contact Us