Update Gradle script to remove deprecated feature and make things work for 2.0-rc-1 as well as 1.12.
Update Groovy version, update Gradle version.