Upgrade to Gradle 1.12
Replace local functions with closures of the project extension
Merge branch 'gradle-1.12'