public interface BuildCacheConfiguration
Modifier and Type | Method | Description |
---|---|---|
DirectoryBuildCache |
getLocal() |
Returns the local directory cache configuration.
|
BuildCache |
getRemote() |
Returns the remote cache configuration.
|
void |
local(Action<? super DirectoryBuildCache> configuration) |
Executes the given action against the local configuration.
|
<T extends BuildCache> |
registerBuildCacheService(java.lang.Class<T> configurationType,
java.lang.Class<? extends BuildCacheServiceFactory<? super T>> buildCacheServiceFactoryType) |
Registers a custom build cache type.
|
<T extends BuildCache> |
remote(java.lang.Class<T> type) |
Configures a remote cache with the given type.
|
<T extends BuildCache> |
remote(java.lang.Class<T> type,
Action<? super T> configuration) |
Configures a remote cache with the given type.
|
void |
remote(Action<? super BuildCache> configuration) |
Executes the given action against the currently configured remote cache.
|
<T extends BuildCache> void registerBuildCacheService(java.lang.Class<T> configurationType, java.lang.Class<? extends BuildCacheServiceFactory<? super T>> buildCacheServiceFactoryType)
configurationType
- Configuration type used to provide parameters to a BuildCacheService
buildCacheServiceFactoryType
- Implementation type of BuildCacheServiceFactory
that is used to create a BuildCacheService
DirectoryBuildCache getLocal()
void local(Action<? super DirectoryBuildCache> configuration)
configuration
- the action to execute against the local cache configuration.@Nullable BuildCache getRemote()
<T extends BuildCache> T remote(java.lang.Class<T> 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.
type
- the type of remote cache to configure.<T extends BuildCache> T remote(java.lang.Class<T> type, Action<? super T> configuration)
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.
type
- the type of remote cache to configure.configuration
- the configuration to execute against the remote cache.void remote(Action<? super BuildCache> configuration)
configuration
- the action to execute against the currently configured remote cache.java.lang.IllegalStateException
- If no remote cache has been assigned yet