Upgrade to gradle 2.2

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