BuildCacheConfiguration

API Documentation:BuildCacheConfiguration

Configuration for the build cache for an entire Gradle build.

Properties

PropertyDescription
local

The local cache configuration.

remote

The remote cache configuration.

Methods

MethodDescription
local(type)

Configures the local cache with the given type.

local(type, configuration)

Configures the local cache with the given type.

local(configuration)

Executes the given action against the local configuration.

remote(type)

Configures a remote cache with the given type.

remote(type, configuration)

Configures a remote cache with the given type.

remote(configuration)

Executes the given action against the currently configured remote cache.

Script blocks

No script blocks

Property details

BuildCache local (read-only)

The local cache configuration.

BuildCache remote (read-only)

The remote cache configuration.

Method details

T local(Class<T> type)

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.

Push is enabled by default for the local cache.

T local(Class<T> type, Action<? super T> configuration)

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.

Push is enabled by default for the local cache.

void local(Action<? super BuildCache> configuration)

Executes the given action against the local configuration.

T remote(Class<T> type)

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.

Push is disabled by default for the remote cache.

T remote(Class<T> type, Action<? super T> configuration)

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.

Push is disabled by default for the remote cache.

void remote(Action<? super BuildCache> configuration)

Executes the given action against the currently configured remote cache.