Interface BuildCacheApi
-
public interface BuildCacheApiConfigures the local and remote build cache.- Since:
- 1.21
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description LocalBuildCachegetLocal()Gets the local build cache configuration.RemoteBuildCachegetRemote()Gets the remote build cache configuration.booleanisRequireClean()Whether thecleanlifecycle phase is required in order to use the build cache.voidregisterMojoMetadataProvider(MojoMetadataProvider metadataProvider)Registers aMojoMetadataProvider, which allows users to configure caching for Mojos that the Develocity Maven extension does not support out of the box.voidregisterNormalizationProvider(NormalizationProvider normalizationProvider)Registers aNormalizationProvider, which allows to configure runtime classpath normalization.voidsetRequireClean(boolean requireClean)Sets whether thecleanlifecycle phase is required in order to use the build cache.
-
-
-
Method Detail
-
getLocal
LocalBuildCache getLocal()
Gets the local build cache configuration.- Returns:
- the local build cache configuration
-
getRemote
RemoteBuildCache getRemote()
Gets the remote build cache configuration.- Returns:
- the remote build cache configuration
-
isRequireClean
boolean isRequireClean()
Whether thecleanlifecycle phase is required in order to use the build cache.- Returns:
trueifcleanis required;false, otherwise
-
setRequireClean
void setRequireClean(boolean requireClean)
Sets whether thecleanlifecycle phase is required in order to use the build cache.You should only set this to
falsewhen the build is started from a clean working directory. Otherwise, produced build cache entries may be incorrect.Configuration via the
develocity.cache.requireCleansystem property will always take precedence.- Parameters:
requireClean- whethercleanis required in order to use the build cache.
-
registerMojoMetadataProvider
void registerMojoMetadataProvider(MojoMetadataProvider metadataProvider)
Registers aMojoMetadataProvider, which allows users to configure caching for Mojos that the Develocity Maven extension does not support out of the box.- Parameters:
metadataProvider- the metadata provider, must not be null
-
registerNormalizationProvider
void registerNormalizationProvider(NormalizationProvider normalizationProvider)
Registers aNormalizationProvider, which allows to configure runtime classpath normalization.This can be used to ignore volatile data on the runtime classpath that does not influence the outcome of goals, e.g. test goals. For more information, please consult the user manual.
- Parameters:
normalizationProvider- the normalization provider, must not be null
-
-