Skip to content

🗂️ Gradle Configuration Cache #28341

@oleg-nenashev

Description

@oleg-nenashev

In Gradle 8.1 (April 2023), we announced the general availability of the Gradle Configuration Cache. This feature significantly improves build performance by caching the result of the configuration phase and reusing this for subsequent builds. Using the configuration cache, Gradle can skip the configuration phase entirely when nothing that affects the build configuration, such as build scripts, has changed. See this blog post by Mikhail Lopatkin to learn more about how configuration caching works.

References

Discuss

Status

Configuration cache is ready for adoption for most of the use cases. Support for some less popular built-in plugins is coming in the next versions.

At the current stage we’re focusing on two aspects:

  • Experience of a software developer running builds locally. This includes:
    • Build correctness with CC.
    • Performance of the cache hit build.
    • Cache hit rate.
    • Performance of the cache miss build.
  • Experience of a build author adopting the configuration cache in their build. This includes:
    • Better compatibility with existing code.
    • Providing diagnostics on unsupported patterns.
    • Preventing from introducing new errors.

While we recognize CI scenarios as important, we’re postponing them for later. However, we’re expecting that with all work we’re doing to optimize local use cases, the potential negative performance impact of enabling CC on CI, where cache hit is hard to achieve, should be reduced too.

Planned

Gradle 9.x tasks

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Current Themes

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions