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.boolean
Whether theclean
lifecycle phase is required in order to use the build cache.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.void
registerNormalizationProvider
(NormalizationProvider normalizationProvider) Registers aNormalizationProvider
, which allows to configure runtime classpath normalization.void
setRequireClean
(boolean requireClean) Sets whether theclean
lifecycle 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 theclean
lifecycle phase is required in order to use the build cache.- Returns:
true
ifclean
is required;false
, otherwise
-
setRequireClean
void setRequireClean(boolean requireClean) Sets whether theclean
lifecycle phase is required in order to use the build cache.You should only set this to
false
when the build is started from a clean working directory. Otherwise, produced build cache entries may be incorrect.Configuration via the
develocity.cache.requireClean
system property will always take precedence.- Parameters:
requireClean
- whetherclean
is 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
-