Interface BuildCacheApi
public interface BuildCacheApi
Configures the local and remote build cache.
- Since:
- 1.21
-
Method Summary
Modifier and TypeMethodDescriptiongetLocal()Gets the local build cache configuration.Gets the remote build cache configuration.booleanWhether 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 Details
-
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
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
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
-