Interface BuildCacheApi


public interface BuildCacheApi
Configures the local and remote build cache.
Since:
1.21
  • 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 the clean lifecycle phase is required in order to use the build cache.
      Returns:
      true if clean is required; false, otherwise
    • setRequireClean

      void setRequireClean(boolean requireClean)
      Sets whether the clean 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 - whether clean is required in order to use the build cache.
    • registerMojoMetadataProvider

      void registerMojoMetadataProvider(MojoMetadataProvider metadataProvider)
      Registers a MojoMetadataProvider, 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 a NormalizationProvider, 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