1

I am running my next gradle-javadoc-doclet task:

apply plugin: com.myproject.build.gradle.web.WebPlugin
apply plugin: 'java'
apply from: 'dependencies.gradle'

group = 'com.myproject'

sourceCompatibility = 1.6
targetCompatibility = 1.6

jar.enabled = true

configurations {
    client
}

task myJavadocs(type: Javadoc) {

    source = sourceSets.main.allJava
    classpath = configurations.compile
    destinationDir = file("./doc/")
  }


task list(dependsOn: configurations.compile) << {
    println "classpath = ${configurations.compile.collect {File file -> file.name}}"
}


task myDoclet(type: Javadoc, dependsOn: myJavadocs) {
    source = sourceSets.main.allJava
    options.doclet = 'Doclet2'
    classpath = configurations.compile
    //options.docletpath = configurations.compile.asType(List)
    List<File> pathList = new ArrayList<File>();
    pathList.add(file('C:\\myproject\\build\\classes\\main\\'))
    options.docletpath = pathList




}

(myJavadocs is just a task that generates the basic javadoc) I am running it in the console like that:

C:\myproject>gradle myDoclet

And when I do that, I receive the next error:

javadoc: error - invalid flag: -doctitle

Looks like that "doctitle" flag is one of the options in the javadoc specification ( Javadoc 1.3 Options ), but it was not in early javadoc versions (it was a "title" flag). I am using the tools.jar (where hte javadoc is) from my JDK (1.6).

Does anyone know what I am doing wrong?

Thank you very much for your time!

FOLLOWUP -

Looks like that "doctitle" tag is on the Standard Doclet (I am running my own doclet), and it is being added by gradle (and my doclet does not recognize it). Does anyone know how can I get rid of that tag, or if there is any way to "include" those tags to my doclet?

raspayu
  • 5,089
  • 5
  • 37
  • 50
  • Can you please post the full build script? – Benjamin Muschko Jun 14 '12 at 00:00
  • Yeah, no problem. I think it will have to do with something from the javadoc version(I mean, if there is no "doctitle" flag, it has to be an early javadoc version), but I have taken the tools.jar from the JDK 6 :-S – raspayu Jun 14 '12 at 07:37

1 Answers1

0

Sorry, javadoc doclet error, not gradle error. If interested, please follow the next link:

Javadoc does not recognize doctitle option/flag

Community
  • 1
  • 1
raspayu
  • 5,089
  • 5
  • 37
  • 50