Patched across to latest gradle template