I'm generating dokkaHtml through the Gradle plugin...
# dokka
e
I'm generating dokkaHtml through the Gradle plugin and would like for it to look as nice as it does in the API, although I don't need all of the ells and whistles, such as links to source code. https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.math/abs.html
Specifically, I like that it links the parameter and shows functions using Kotlin style. The output from my dokkaHtml task looks like this:
Specifically, it looks like a Java function, and the parameters are not linked. Here is my `build.gradle.kts`:
Copy code
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
    kotlin("jvm") version "1.7.10"
    id("org.jetbrains.dokka") version "1.7.10"
}

group = "edu.northeastern.cs2500"
version = "1.0-SNAPSHOT"

repositories {
    mavenCentral()
}

dependencies {
    implementation("org.junit.jupiter:junit-jupiter:5.9.0")
    dokkaHtmlPlugin("org.jetbrains.dokka:kotlin-as-java-plugin:1.7.10")
    testImplementation(kotlin("test"))
}

tasks.withType<org.jetbrains.dokka.gradle.DokkaTask>().configureEach {
    dokkaSourceSets {
        named("main") {
            includes.from(fileTree(project.rootDir) {
                include("src/**/package.md")
            })
        }
    }
}

tasks.test {
    useJUnitPlatform()
}

tasks.withType<KotlinCompile> {
    kotlinOptions.jvmTarget = "1.8"
}
i
Hi! I see you have
kotlin-as-java-plugin
in your dependencies - that's why the signatures are as if they were written in Java. If you remove it, you'll see your average Kotlin signatures Regarding styling, stdlib uses an old (~1.4-1.5) and customized version of Dokka, we're actually in the process of migrating it to the recent version. So it's not very representative This is how unmodified Dokka should look like for 1.7.10: https://kotlinlang.org/api/kotlinx.coroutines/ We're also introducing some UI changes in the upcoming 1.7.20 release, so it'll look noticeably better ­čÖé
­čÖĆ 1
e
I see you have
kotlin-as-java-plugin
in your dependencies - that's why the signatures are as if they were written in Java. If you remove it, you'll see your average Kotlin signatures
D'oh!