It worked with milestone-1 and everything before, it seems to think that 
everything is UP-TO-DATE and doesn't do anything (so really it isn't "failing" 
but it causes my hudson build to fail as there are no javadocs to archive).

So, I'm guessing it was fixed so that it notices that there are no sources 
declared, and hence "UP-TO-DATE".  Below is what I had.  What is the 
recommended way to refactor this so it works properly at the configuration 
phase?

task alljavadoc(type: Javadoc) {

  dependsOn project.subprojects.collect { Project subproj ->
              subproj.tasks.withType(Javadoc).collect { subproj.classes }
  }

  include '**/*.java'
  destinationDir = file("${buildDir}/docs/javadoc")
  title = 'All Javadocs'

  // NOTE: Some source and class trees are added dynamically (generated at
  //       build time), so must collect all of them at run time
  doFirst { Javadoc task ->
    task.project.subprojects.each { Project subproject ->
      subproject.tasks.withType(Javadoc).each { Javadoc subtask ->
        if (task.source == null)
        {
          task.source = subtask.source
        }
        else
        {
          task.source = task.source + subtask.source
        }

        if (task.classpath == null)
        {
          task.classpath = subtask.classpath
        }
        else
        {
          task.classpath = task.classpath + subtask.classpath
        }
      }
    }
  }
}

-Spencer

Reply via email to