'How to convert JavaDoc into Markdown?

I have an Android library fully written in Java which contains a bunch of comments that I can generate into JavaDoc and see in HTML format.

I would like to find a way of either converting my JavaDoc into Markdown, or straight up generating Markdown from the comments in my Android library project.

For reference, I've looked into Dokka, which only seems to works for Kotlin project, so that seems out of the equation.



Solution 1:[1]

You can use marklet lib to convert JavaDoc to markdown.Marklet Github link. You can configure it in your pom if you use maven

  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-javadoc-plugin</artifactId>
    <version>2.9</version>
    <configuration>
        <doclet>fr.faylixe.marklet.Marklet</doclet>
        <docletArtifact>
            <groupId>fr.faylixe</groupId>
            <artifactId>marklet</artifactId>
            <version>1.1.0</version>
        </docletArtifact>
        <reportOutputDirectory>./</reportOutputDirectory>
        <destDir>./</destDir>
        <additionalparam>-d javadoc/</additionalparam>
        <useStandardDocletOptions>false</useStandardDocletOptions>
    </configuration>
</plugin>

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Simona R.