All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.gradle.develocity.agent.maven.api.cache.BuildCacheApi Maven / Gradle / Ivy

Go to download

Maven extension for Develocity installations that provides Build Insights, Build Caching, Predictive Test Selection, and Test Distribution for Maven builds. Alternatively, Build Insights can be captured and viewed for free at scans.gradle.com and Build Caching can be used for free locally. See https://gradle.com for more information on Develocity.

There is a newer version: 1.23
Show newest version
package com.gradle.develocity.agent.maven.api.cache;

/**
 * Configures the local and remote build cache.
 *
 * @since 1.21
 */
public interface BuildCacheApi {

    /**
     * Gets the local build cache configuration.
     *
     * @return the local build cache configuration
     */
    LocalBuildCache getLocal();

    /**
     * Gets the remote build cache configuration.
     *
     * @return the remote build cache configuration
     */
    RemoteBuildCache getRemote();

    /**
     * Whether the {@code clean} lifecycle phase is required in order to use the build cache.
     *
     * @return {@code true} if {@code clean} is required; {@code false}, otherwise
     */
    boolean isRequireClean();

    /**
     * Sets whether the {@code clean} lifecycle phase is required in order to use the build cache.
     * 

* You should only set this to {@code false} when the build is started from a clean working directory. * Otherwise, produced build cache entries may be incorrect. *

* Configuration via the {@code develocity.cache.requireClean} system property will always take precedence. * * @param requireClean whether {@code clean} is required in order to use the build cache. */ void setRequireClean(boolean requireClean); /** * Registers a {@link MojoMetadataProvider}, which allows users to configure caching for Mojos * that the Develocity Maven extension does not support out of the box. * * @param metadataProvider the metadata provider, must not be null */ void registerMojoMetadataProvider(MojoMetadataProvider metadataProvider); /** * Registers a {@link 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. * * @param normalizationProvider the normalization provider, must not be null */ void registerNormalizationProvider(NormalizationProvider normalizationProvider); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy