Package org.gradle.caching.configuration
Schnittstelle BuildCacheConfiguration
public interface BuildCacheConfiguration
Configuration for the build cache for an entire Gradle build.
- Seit:
- 3.5
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibunggetLocal()Returns the local directory cache configuration.Returns the remote cache configuration.voidlocal(Action<? super DirectoryBuildCache> configuration) Executes the given action against the local configuration.<T extends BuildCache>
voidregisterBuildCacheService(Class<T> configurationType, Class<? extends BuildCacheServiceFactory<? super T>> buildCacheServiceFactoryType) Registers a custom build cache type.<T extends BuildCache>
TConfigures a remote cache with the given type.<T extends BuildCache>
TConfigures a remote cache with the given type.voidremote(Action<? super BuildCache> configuration) Executes the given action against the currently configured remote cache.
-
Methodendetails
-
registerBuildCacheService
<T extends BuildCache> void registerBuildCacheService(Class<T> configurationType, Class<? extends BuildCacheServiceFactory<? super T>> buildCacheServiceFactoryType) Registers a custom build cache type.- Parameter:
configurationType- Configuration type used to provide parameters to aBuildCacheServicebuildCacheServiceFactoryType- Implementation type ofBuildCacheServiceFactorythat is used to create aBuildCacheService
-
getLocal
DirectoryBuildCache getLocal()Returns the local directory cache configuration. -
local
Executes the given action against the local configuration.- Parameter:
configuration- the action to execute against the local cache configuration.
-
getRemote
Returns the remote cache configuration. -
remote
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.
- Parameter:
type- the type of remote cache to configure.
-
remote
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.
- Parameter:
type- the type of remote cache to configure.configuration- the configuration to execute against the remote cache.
-
remote
Executes the given action against the currently configured remote cache.- Parameter:
configuration- the action to execute against the currently configured remote cache.- Löst aus:
IllegalStateException- If no remote cache has been assigned yet
-