Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Javadoc with Gradle : show also private members

Tags:

gradle

javadoc

I am generating the Javadoc from my project with gradle, and I want to get in the Javadoc and also the private members.

In the command line, while running javadoc, you can use the -private flag to achieve that. But, how can I do that on my build.gradle?

I have my task in the next way:

task myJavadocs(type: Javadoc) {    
    source = sourceSets.main.allJava
    classpath = configurations.compile
    destinationDir = file("./doc/")
  }

I am sure that there is any "option" there for doing that, but I can't find it.

like image 980
raspayu Avatar asked Jun 21 '12 16:06

raspayu


1 Answers

Found it!

It has to be set to a JavadocMemberLevel with options.memberLevel.

Task should look like that:

task myJavadocs(type: Javadoc) {    
    source = sourceSets.main.allJava
    options.memberLevel = JavadocMemberLevel.PRIVATE
    classpath = configurations.compile
    destinationDir = file("./doc/")
  }
like image 99
raspayu Avatar answered Oct 13 '22 15:10

raspayu