Search in sources :

Example 1 with ProjectCacheDir

use of org.gradle.initialization.layout.ProjectCacheDir 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);
}
Also used : BuildLayoutConfiguration(org.gradle.initialization.layout.BuildLayoutConfiguration) File(java.io.File) BuildLayout(org.gradle.initialization.layout.BuildLayout) ProjectCacheDir(org.gradle.initialization.layout.ProjectCacheDir)

Aggregations

File (java.io.File)1 BuildLayout (org.gradle.initialization.layout.BuildLayout)1 BuildLayoutConfiguration (org.gradle.initialization.layout.BuildLayoutConfiguration)1 ProjectCacheDir (org.gradle.initialization.layout.ProjectCacheDir)1