All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jetbrains.kotlin.doc.KDoc.kt Maven / Gradle / Ivy

There is a newer version: 0.12.1230
Show newest version
package org.jetbrains.kotlin.doc

import java.io.File
import org.jetbrains.kotlin.doc.highlighter2.Html2CompilerPlugin
import org.jetbrains.kotlin.doc.model.*

/** Generates the Kotlin Documentation for the model */
class KDoc(arguments: KDocArguments) : KModelCompilerPlugin(arguments) {

    protected override fun processModel(model: KModel) {
        val outputDir = File(arguments.apply().docOutputDir)

        // TODO allow this to be configured; maybe we use configuration on the KotlinModule
        // to define what doclets to use?
        val generator = JavadocStyleHtmlDoclet()
        generator.generate(model, outputDir)

        val srcGenerator = Html2CompilerPlugin(arguments)
        srcGenerator.generate(model, outputDir)
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy