Upgrade to gradle build system