use of org.gradle.initialization.layout.BuildLayout 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());
}
use of org.gradle.initialization.layout.BuildLayout in project gradle by gradle.
the class BuildSessionScopeServices method createCacheLayout.
ProjectCacheDir createCacheLayout(StartParameter startParameter, BuildLayoutFactory buildLayoutFactory) {
BuildLayout buildLayout = buildLayoutFactory.getLayoutFor(new BuildLayoutConfiguration(startParameter));
File cacheDir = startParameter.getProjectCacheDir() != null ? startParameter.getProjectCacheDir() : new File(buildLayout.getRootDirectory(), ".gradle");
return new ProjectCacheDir(cacheDir);
}
use of org.gradle.initialization.layout.BuildLayout in project gradle by gradle.
the class LayoutToPropertiesConverter method configureFromBuildDir.
private void configureFromBuildDir(File currentDir, boolean searchUpwards, Map<String, String> result) {
BuildLayout layout = buildLayoutFactory.getLayoutFor(currentDir, searchUpwards);
maybeConfigureFrom(new File(layout.getRootDirectory(), Project.GRADLE_PROPERTIES), result);
}
Aggregations