api / org.gradle.caching.configuration / BuildCacheConfiguration

BuildCacheConfiguration

interface BuildCacheConfiguration

Configuration for the build cache for an entire Gradle build.

Since
3.5

Functions

getLocal

abstract fun getLocal(): BuildCache

Returns the local cache configuration.

getRemote

abstract fun getRemote(): BuildCache

Returns the remote cache configuration.

local

abstract fun <T : BuildCache> local(type: Class<T>): T

Configures the local cache with the given type.

If a local build cache has already been configured with a different type, this method replaces it.

Storing ("push") in the local build cache is enabled by default.

abstract fun <T : BuildCache> local(type: Class<T>, configuration: Action<in T>): T

Configures the local cache with the given type.

If a local build cache has already been configured with a different type, this method replaces it.

If a local build cache has already been configured with the same type, this method configures it.

Storing ("push") in the local build cache is enabled by default.

abstract fun local(configuration: Action<in BuildCache>): Unit

Executes the given action against the local configuration.

registerBuildCacheService

abstract fun <T : BuildCache> registerBuildCacheService(configurationType: Class<T>, buildCacheServiceFactoryType: Class<out BuildCacheServiceFactory<in T>>): Unit

Registers a custom build cache type.

remote

abstract fun <T : BuildCache> remote(type: Class<T>): T

Configures a remote cache with the given type.

If a remote build cache has already been configured with a different type, this method replaces it.

Storing ("push") in the remote build cache is disabled by default.

abstract fun <T : BuildCache> remote(type: Class<T>, configuration: Action<in T>): T

Configures a remote cache with the given type.

If a remote build cache has already been configured with a different type, this method replaces it.

If a remote build cache has already been configured with the same, this method configures it.

Storing ("push") in the remote build cache is disabled by default.

abstract fun remote(configuration: Action<in BuildCache>): Unit

Executes the given action against the currently configured remote cache.