Search in sources :

Example 1 with BuildCacheMode

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));
}
Also used : Path(org.gradle.util.Path) StartParameter(org.gradle.StartParameter) RemoteAccessMode(org.gradle.caching.internal.controller.BuildCacheControllerFactory.RemoteAccessMode) File(java.io.File) BuildCacheMode(org.gradle.caching.internal.controller.BuildCacheControllerFactory.BuildCacheMode)

Aggregations

File (java.io.File)1 StartParameter (org.gradle.StartParameter)1 BuildCacheMode (org.gradle.caching.internal.controller.BuildCacheControllerFactory.BuildCacheMode)1 RemoteAccessMode (org.gradle.caching.internal.controller.BuildCacheControllerFactory.RemoteAccessMode)1 Path (org.gradle.util.Path)1