Skip to content

Cache dynamic versions in documentation tests - #2179

Merged
Goooler merged 2 commits into
mainfrom
g/20260811/strategy-for-versions
Aug 11, 2026
Merged

Cache dynamic versions in documentation tests#2179
Goooler merged 2 commits into
mainfrom
g/20260811/strategy-for-versions

Conversation

@Goooler

@Goooler Goooler commented Aug 11, 2026

Copy link
Copy Markdown
Member

Gradle keeps a cache of dynamic version => resolved version (ie 2.+ => 2.3). By default, these cached values are kept for 24 hours, after which the cached entry is expired and the dynamic version is resolved again.

https://docs.gradle.org/current/kotlin-dsl/gradle/org.gradle.api.artifacts/-resolution-strategy/cache-dynamic-versions-for.html

Follow up #2155.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR follows up on #2155 by attempting to reduce repeated remote metadata lookups during documentTest runs when documentation snippets use dynamic dependency versions (<version> placeholders replaced with +).

Changes:

  • Adds a settings.gradle snippet hook (gradle.beforeProject { ... }) to cache dynamic versions for 30 days for snippet builds.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@Goooler
Goooler enabled auto-merge (squash) August 11, 2026 02:00
@Goooler
Goooler merged commit f81b616 into main Aug 11, 2026
6 checks passed
@Goooler
Goooler deleted the g/20260811/strategy-for-versions branch August 11, 2026 02:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants