scphantm
scphantm

Reputation: 4533

Specify multiple taglets in gradle build

I am writing several javadoc taglets to aid in various documentation requirements we have. with ant, I can specify multiple taglets by just adding additional taglet lines. But I can't seem to figure out how to do the same thing in gradle.

when i try

javadoc {
  options.addStringOption "taglet", "com.onuspride.codetools.xdoclet.ToDo"

  options.addStringOption "taglet", "com.onuspride.codetools.xdoclet.ReviewedBy"
  options.addStringOption "tagletpath", sourceSets.main.output.classesDir.path
}

the first one specified is overwritten with the second one and the first one is not processed.

what am i doing wrong?

Upvotes: 1

Views: 502

Answers (1)

scphantm
scphantm

Reputation: 4533

got it,

    javadoc {
def tagList = ["com.onuspride.codetools.xdoclet.ReviewedBy", 
            "com.onuspride.codetools.xdoclet.ToDo"]

        options.setTaglets(tagList)
        options.addStringOption "tagletpath", sourceSets.main.output.classesDir.path
}

Upvotes: 1

Related Questions