Build multi projects in parallel

I have several multi project gradle projects for which I want to trigger build in parallel. I am aware that within a multi project we can use the org.gradle.paralllel option.

Let me know in case if any body has done something of this sort.

I tried something like below , but from the errors I think this is not the right approach. In the below set up , project1 project2 porject3 are three mutliprojects with their specific settings.xml

String[] mutliprojects = ["project1","project2","project3"]
  task buildAllComponents() {
   mutliprojects .each { def componentName ->
      tasks.add(name: "build$componentName", type: GradleBuild) {
   buildFile = componentName + "/build.gradle"
  startParameter.setExcludedTaskNames(['test'])
  tasks = ['clean','build','upload']
         }
  }
    GParsPool.withPool(8) {
 mutliprojects .eachParallel{
  println " ******** BUILDING ******** " + it
   String taskName = "build" + it
   tasks."$taskName".execute()
     }
 }
      }

Please provide information on the errors you are getting.

When I tried this in gralde 1.4 , I got an locking error in task artifact.

I will try this again in 1.6 and post the stack trace.