Build improvements.

Updated to latest Gradle, aligned closer to previous SBT build and rationalised all configuration.