Source Directory Creation for Java Projects in Gradle 1.0-milestone-9

The Gradle cookbook describes how source directories can be created via build file (task create-dirs) for Gradle 0.9. This was working fine for me until Gradle 1.0-milestone-8 but is now broken in Gradle 1.0-milestone-9.

I would be grateful for an explanation on how this can be achieved now.

Many thanks

The getAll() method of DomainObjectCollection was removed. I included the link to the migration guide at the bottom.

sourceSets.all { set -> set.allSource.srcDirs.each { it.mkDirs() } }

The key being the all() method that takes a closure that will configure each source set.

Thanks so much and sorry for inadequate question. I intended to include a link to the cookbook and copy the code but missed that.