Updated project to use latest gradle plugin.

Also cleaned up build script