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?
Sorry, javadoc doclet error, not gradle error. If interested, please follow the next link: