Update build.gradle for recent version of gradle
Fix generated messages