Skip to content

ci: retry the Gradle resolve instead of failing on one 404 - #513

Merged
an1ndra merged 1 commit into
Developfrom
ci/gradle-retry
Nov 19, 2026
Merged

an1ndra merged 1 commit into
Developfrom
ci/gradle-retry

Conversation

@an1ndra

@an1ndra an1ndra commented Nov 19, 2026

Copy link
Copy Markdown
Owner

What changed

The PR and Develop builds retry the Gradle resolve up to three times, clearing the module cache between attempts, instead of failing on the first 404.

Why

PR #512 failed twice in ~35 s with:

A problem occurred configuring root project 'Messages'.
> Could not find org.jetbrains.kotlin:kotlin-stdlib:2.4.21.
> Could not find org.jetbrains:annotations:13.0.
> Could not find org.jetbrains.kotlin:compose-compiler-gradle-plugin:2.2.20.
> Could not find com.google.guava:guava:33.4.0-jre.

That is plugin resolution, before any code compiles. Every one of those artifacts answers 200 from here - including annotations:13.0, which is a decade old - and the runs around it (#166, #167, #168) built in four minutes on the same runners. #165 (PR #508) failed the same way. So it is a transient registry failure on a cold cache, not a broken dependency.

Testing

  • Workflow YAML parses
  • No app code changed; the PR build itself exercises the new step

The red run on #512 stays red, because a re-run uses the workflow pinned to that commit. That is why this lands on its own.

A cold Gradle cache has to fetch every plugin from Maven Central and the
Plugin Portal, and a single 404 there fails the build before a line of
Kotlin compiles. PR #512 failed twice that way in 35 s on artifacts that
resolve fine from every other network — including a decade-old
`annotations:13.0` — and so did #508, while the PRs around them built in
four minutes.

The build now retries up to three times, clearing the module cache between
attempts so a half-written resolve cannot poison the next one. Same for
the Develop build, which shares the failure mode.
@an1ndra
an1ndra merged commit 74ef528 into Develop Nov 19, 2026
1 check passed
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.

1 participant