use of org.gradle.wrapper.WrapperExecutor in project gradle by gradle.
the class DistributionFactory method getDefaultDistribution.
/**
* Returns the default distribution to use for the specified project.
*/
public Distribution getDefaultDistribution(File projectDir, boolean searchUpwards) {
BuildLayout layout = new BuildLayoutFactory().getLayoutFor(projectDir, searchUpwards);
WrapperExecutor wrapper = WrapperExecutor.forProjectDirectory(layout.getRootDirectory());
if (wrapper.getDistribution() != null) {
return new ZippedDistribution(wrapper.getConfiguration(), distributionBaseDir, clock);
}
return getDownloadedDistribution(GradleVersion.current().getVersion());
}
Aggregations