Fix issue where the wrong gradle version may be used