6

If I have a project that has java, groovy, and kotlin plugins applied with code written in each, how do I create (and should I) create a single javadoc.jar distribution with all of the code documentation?

The java plugin gives me the javadoc class, the groovy plugin gives me the groovydoc task, but these do not seem to cooperate.

How do I "merge" this documentation into a single cohesive artifact?

mkobit
  • 43,979
  • 12
  • 156
  • 150

1 Answers1

0

On the java+groovy side you can do

groovydoc.source 'src/main/java'

and only run the groovydoc task. The only drawback is that you are going to get the groovydoc formatting for all your classes.

Creating the javadoc JAR then becomes

task javadocJar(type: Jar) {
    description "An archive of the JavaDocs for Maven Central"
    classifier "javadoc"
    from groovydoc
}
ysb33r
  • 11
  • 3