KDoc은 Kotlin 코드의 문서화를 위한 언어로 JavaDoc과 유사합니다.
가장 큰 차이점은 JavaDoc은 HTML을 사용하고 KDoc은 마크다운을 사용한다는 점입니다.
/**
* A group of *members*.
*
* This class has no useful logic; it's just a documentation example.
*
* @param T the type of a member in this group.
* @property name the name of this group.
* @constructor Creates an empty group.
*/
class Group<T>(val name: String) {
/**
* Adds a [member] to this group.
* @return the new size of the group.
*/
fun add(member: T): Int { ... }
}
/**
로 시작하여 */
로 끝납니다./**
엔터 누르면 자동 생성plugins {
id("org.jetbrains.dokka") version "1.9.20"
}
./gradlew dokkaHtml