I'm trying to upgrade one of my projects from Gradle 0.7 to Gradle 0.8. The
project has a number of subprojects, for which I'd like to generate combined
Javadocs. At the moment, I have the following in my root build.gradle:

task apidocs(type: Javadoc, visible: false)  {
    destinationDir = new File(project.buildDir, 'docs/api')

    srcDirs = []
    options.links = ['http://java.sun.com/javase/6/docs/api/']

    subprojects.each {subproject ->
        subproject.sourceSets.each {sourceSet ->
            sourceSet.java.srcDirs.each {srcDir ->
                srcDirs << srcDir
            }
        }

        if (classpath) {
            classpath += subproject.configurations.apidocs
        } else {
            classpath = subproject.configurations.apidocs
        }

        if (subproject.hasProperty('apidocUrls')) {
            options.links += subproject.property('apidocUrls')
        }
    }
}

I have a couple of questions:

- in the 0.7 version, I used the options' classpath property, but that seems
to be removed. My current approach seems a bit clumsy - is there a more
elegant way?
- the build fails with the message *No value has been specified for property
'optionsFile'*. Is optionsFile intended to be required?

Thanks in advance,
  Levi

Reply via email to