File (@Nullable Project project) { File result = getGradleHomeFromPath(project); if (result != null) return result; result = getGradleHomeFromEnvProperty(project); if (result != null) return result; if (SystemInfo.isMac) { return getGradleHomeFromBrew(); } return null; }