Upgrade to gradle 1.12.

Reviewed at https://reviews.apache.org/r/21758/