Conversation
With the default version "latest", the dev.jbang plugin fetches version.txt from jbang.dev whenever jbang is not on the PATH -- with a 10 s timeout and no retries. A CI run already failed on exactly that. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XubvYCwnYXvmX8ZbRoBovx
JBang resolves script //DEPS into ~/.m2, which no cache in this repository covers, so every job re-downloads them from Maven Central. Setting JBANG_REPO into the Gradle user home's caches/ directory reuses the cache gradle/actions/setup-gradle already maintains. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XubvYCwnYXvmX8ZbRoBovx
The dev.jbang gradle plugin installs JBang itself into ~/.gradle/caches/jbang, which gradle/actions/setup-gradle already caches. Installing JBang and restoring/saving a second cache in every gradle job is wasted work. The two jobs that call `jbang` from the shell (jbang-check, ghprcomment in pr-comment.yml) now set up JBang themselves. The `jbang --version` debug output in binaries.yml is removed with it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XubvYCwnYXvmX8ZbRoBovx
Both jobs cache ~/.jbang, but JBang resolves the script dependencies into ~/.m2, so only the built script jars were cached. JBANG_REPO moves them into the directory that is cached anyway. Also: the heylogs job used actions/cache/restore without a matching save, so its key was never written, and runner.os in the cache keys is constant for these two ubuntu-only jobs. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XubvYCwnYXvmX8ZbRoBovx
The gradle manager is disabled in this configuration, and the version is a plain Kotlin val anyway, so a custom regex manager against the jbangdev/jbang releases keeps the pin from going stale. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XubvYCwnYXvmX8ZbRoBovx
jbang-check caches ~/.jbang with a shared key, so the "JBang (PR)" job restores what "JBang (main)" wrote - both build the same scripts. The jablib snapshot is published into that repository accordingly. pr-comment does not run Gradle at all, so it no longer pulls in setup-gradle just to get a JDK; it sets up Java and JBang directly and caches ghprcomment's dependencies under its own key. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XubvYCwnYXvmX8ZbRoBovx
PR Summary by QodoStabilize CI by fixing JBang caching, pinning JBang, and using Maven Central mirror
AI Description
Diagram
High-Level Assessment
Files changed (7)
|
Code Review by Qodo
1.
|
versions/build.gradle.kts is a java-platform for Maven coordinates; JBang is a CLI, not a dependency, so it has no place there. gradle.properties is the central spot the build already reads project-wide settings from. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XubvYCwnYXvmX8ZbRoBovx
Summary
The gradle jbang plugin doesn't find our cached JBang file. This PR tries to fix it.
Steps to test
See no error on
version.txtany more.Related issues and pull requests
Closes NA
jbangdev/jbang-gradle-plugin#25
AI usage
Claude guided me somehow.
Checklist
CHANGELOG.mdin a way that can be understood by the average user (if change is visible to the user)