I am attempting to use the UmlGraph doclet with a Javadoc task. UmlGraphDoc has options that do not take an argument. Is there a way to pass these using gradle? I have tried various incantations of the add option methods of ‘CoreJavadocOptions’, but none have yielded the result I am looking for.
This is the ant doclet tag that I would need to translate. The ‘-inferrel’ and ‘-inferdep’ options don’t have args, for example.
<doclet name="org.umlgraph.doclet.UmlGraphDoc" path="${lib}/UMLGraph.jar">
<param name="-inferrel"/>
<param name="-inferdep"/>
<param name="-hide" value="java.*"/>
<param name="-collpackages" value="java.util.*"/>
<param name="-qualify"/>
<param name="-postfixpackage"/>
<param name="-nodefontsize" value="9"/>
<param name="-nodefontpackagesize" value="7"/>
<param name="-link" value="http://java.sun.com/j2se/1.5.0/docs/guide/javadoc/doclet/spec"/>
<param name="-link" value="http://java.sun.com/j2se/1.5/docs/api"/>
</doclet>
task javadoc(type: Javadoc) {
source subprojects.sourceSets*.main*.allJava
classpath = files(subprojects.sourceSets*.main*.compileClasspath)
options.docletpath = configurations.javadoclet.files.asType(List)
options.doclet = 'org.umlgraph.doclet.UmlGraphDoc'
options.classpath subprojects.sourceSets*.main*.classesDir
options.memberLevel = 'PRIVATE'
// These result in the option not being passed at all.
options.addStringOption('inferrel', null)
options.addStringOption('inferrel')
// This results in an empty string as an argument to the option, which is invalid.
options.addStringOption('inferrel', '')
}