Gradle Cache Feature
Caches Gradle dependencies to speed up the builds. The feature tracks shared cache directories (<gradle_user_home>/caches/modules-2
) used by Gradle steps and caches dependencies in the artifact storage. The cache is automatically updated when dependencies of corresponding Gradle projects change.
Dependency caching is most effective on short-lived agents. For long-lived or permanent cloud agents, periodically review hidden .teamcity.build_cache
build artifacts to monitor cache size and contents. This helps prevent redundant dependencies and unnecessary cache bloat.
Example. Enables Gradle dependency cache to speed up the builds
buildType {
// Other Build Type settings ...
features {
// Other Build Features ...
gradleCache {
}
Content copied to clipboard }
}
See also
Functions
Copies parameters of this object to the specified target
Creates an instance of this build feature via reflection using a no argument constructor, used during copying. Throws an error if this class doesn't have a default constructor. Subclasses can override it to create an instance without using a default constructor.
Validates this object and reports found errors to the provided consumer