Sample needed please on parallel build

can anyone provide a sample of how i could use parallel threads or tasks to build groovydocs concurrently with javadocs ? this sounds like it might be possible but cannot get the hang of how we might do it

Currently, Gradle will only execute tasks from different projects in parallel. You can enable parallel execution with the ‘–parallel’ command-line option.

silly me - i thought something like this might do the trick (after fixing settings.gradle and gradle.properties for multi work):

repositories {
    mavenCentral()
    //add repositories for optional dependencies
    mavenRepo urls: ["http://repository.jboss.org/maven2/"]}
  dependencies {
    compile localGroovy()
    compile "org.codehaus.gpars:gpars:1.0.0"
}
  task doItFaster<<
      ///dependsOn: [groovydoc])
 { tsk->
 println "doItFaster()="+tsk;
 GParsPool.withPool { pool->
  println "doItFaster()=pool="+pool;
  groovydoc().asynch();
  javadocs().asynch();
   javadocJar().asynch();
 }
}

though possibly not :{

You can use GPars within your task, but a task can’t call other tasks. Bad things can happen if you do.