How to generate Javadocs for both Java and Kotlin sources together

41 views Asked by At

It seems javadoc maven plugin cannot generate javadocs for Kotlin source code. Thus, I successfully replace it with Jetbrains Dokka maven plugin. But now Dokka only generates javadocs for Java source code and is missing Kotlin source code.

I have already tried to include sourceDirectories and sourceRoots in the Jetbrains Dokka maven plugin according to documentation, but it continues to generate javadocs only for Java source code.

I am using the following configuration in pom.xml:

<executions>
        <execution>
            <phase>prepare-package</phase>
            <goals>
                <goal>dokka</goal>
                <goal>javadoc</goal>
                <goal>javadocJar</goal>
            </goals>
        </execution>
    </executions>
    <configuration>
        <sourceDirectories>
            <source>src/main/java</source>
            <source>src/main/kotlin</source>
        </sourceDirectories>
        <sourceRoots>
            <root>
                <path>src/main/kotlin</path>
                <!-- See platforms section of documentation -->
                <platforms>JVM</platforms>
            </root>
        </sourceRoots>
    </configuration>
</plugin>
0

There are 0 answers