Search in sources :

Example 1 with RootBuildCacheControllerRef

use of org.gradle.caching.internal.controller.RootBuildCacheControllerRef in project gradle by gradle.

the class RootBuildCacheControllerSettingsProcessor method process.

@Override
public SettingsInternal process(GradleInternal gradle, SettingsLocation settingsLocation, ClassLoaderScope buildRootClassLoaderScope, StartParameter startParameter) {
    SettingsInternal settings = delegate.process(gradle, settingsLocation, buildRootClassLoaderScope, startParameter);
    if (gradle.getParent() == null) {
        BuildCacheController rootController = gradle.getServices().get(BuildCacheController.class);
        RootBuildCacheControllerRef rootControllerRef = gradle.getServices().get(RootBuildCacheControllerRef.class);
        rootControllerRef.set(rootController);
    }
    return settings;
}
Also used : SettingsInternal(org.gradle.api.internal.SettingsInternal) RootBuildCacheControllerRef(org.gradle.caching.internal.controller.RootBuildCacheControllerRef) BuildCacheController(org.gradle.caching.internal.controller.BuildCacheController)

Aggregations

SettingsInternal (org.gradle.api.internal.SettingsInternal)1 BuildCacheController (org.gradle.caching.internal.controller.BuildCacheController)1 RootBuildCacheControllerRef (org.gradle.caching.internal.controller.RootBuildCacheControllerRef)1