File (ConnectionParameters connectionParameters) { File distributionBaseDir = connectionParameters.getDistributionBaseDir(); if (distributionBaseDir != null) { return distributionBaseDir; } else { File userHomeDir = connectionParameters.getGradleUserHomeDir(); return userHomeDir != null ? userHomeDir : GradleUserHomeLookup.gradleUserHome(); } }