use of org.gradle.caching.internal.controller.BuildCacheControllerFactory.BuildCacheMode in project gradle by gradle.
the class BuildCacheTaskServices method doCreateBuildCacheController.
private BuildCacheController doCreateBuildCacheController(ServiceRegistry serviceRegistry, BuildCacheConfigurationInternal buildCacheConfiguration, BuildOperationExecutor buildOperationExecutor, InstantiatorFactory instantiatorFactory, GradleInternal gradle) {
StartParameter startParameter = gradle.getStartParameter();
Path buildIdentityPath = gradle.getIdentityPath();
File gradleUserHomeDir = gradle.getGradleUserHomeDir();
BuildCacheMode buildCacheMode = startParameter.isBuildCacheEnabled() ? ENABLED : DISABLED;
RemoteAccessMode remoteAccessMode = startParameter.isOffline() ? OFFLINE : ONLINE;
boolean logStackTraces = startParameter.getShowStacktrace() != ShowStacktrace.INTERNAL_EXCEPTIONS;
return BuildCacheControllerFactory.create(buildOperationExecutor, buildIdentityPath, gradleUserHomeDir, buildCacheConfiguration, buildCacheMode, remoteAccessMode, logStackTraces, instantiatorFactory.inject(serviceRegistry));
}
Aggregations