You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Hosted Gradle snippet is always Groovy DSL, so pasting it into a build.gradle.kts fails to compile #348
[agent] Found by the scheduled Gradle bug-hunt routine (ledger #319).
Summary
redirect_gradle_manual_snippet fires for build.gradle.kts / settings.gradle.kts as well as the Groovy files, but its snippet is always Groovy: maven { url "…" }. That is not valid Kotlin DSL, so a user who pastes it into a Kotlin DSL build (the gradle init default since Gradle 8) gets a script compilation error. The code comment on gradle_snippet says "the Kotlin DSL differs only in quoting", but it doesn't: Kotlin needs url = uri("…"). The warning also doesn't say the snippet is Groovy-only.
Impact
The documented Gradle hosted path can't be used verbatim by Kotlin DSL projects. The failure is loud, not silent, but users have to know how to translate the snippet.
Repro
Paste the exact snippet from scan --mode hosted --json (redirect.warnings[].detail) into a build.gradle.kts with plugins { java }, repositories { mavenCentral() } and implementation("org.apache.commons:commons-text:1.10.0-socket.4d5e6f70"), then run gradle dependencies:
e: file:///…/build.gradle.kts:6:25: Unexpected tokens (use ';' to separate expressions on the same line)
* Where: Build file '…/build.gradle.kts' line: 6
maven { url "file:///tmp/gw/socketrepo" }
Replacing only that line with maven { url = uri("file:///tmp/gw/socketrepo") } makes the build resolve commons-text-1.10.0-socket.4d5e6f70.jar, so includeVersion(...) and the rest of the block are fine in Kotlin.
Expected vs actual
Expected (docs/ecosystems.md, "Gradle (hosted Maven)"): a present build.gradle* / settings.gradle* gets a paste-ableexclusiveContent { … } snippet. For a .kts build it should be Kotlin syntax, or both variants should be printed.
Actual: Groovy syntax, and a compile error in every Kotlin DSL build.
Matrix (Linux; each run twice)
Gradle
JDK
Groovy build.gradle
Kotlin build.gradle.kts
6.9.4
11
compiles ✅
compile error ❌
7.6.6
17
compiles ✅
compile error ❌
8.14.3
21
compiles ✅
compile error ❌
9.8.0
21
compiles ✅
compile error ❌
First bad release
v4.0.0, when the snippet was introduced.
Suspect code
crates/socket-patch-core/src/patch/redirect/mod.rs:7133-7157 (gradle_snippet, one fixed format string). GRADLE_FILES at mod.rs:6529 includes the .kts names, but the DSL is never selected.
[agent] Triaged: priority:p3 (Gradle). This isn't a duplicate, and I found no existing fix PR. The cause is that gradle_snippet (patch/redirect/mod.rs) emits Groovy only. It's the same function as #347, but that one is a separate defect (the snippet's version-conflict semantics). Both will likely be touched together whenever that snippet is reworked.
[agent] Claiming this issue as part of the full Gradle support campaign (agent / hosted / vendored modes, tested on Gradle 6.9/7.6/8.x/9.x on Linux, macOS and Windows). Branch: feat/gradle-support. Claim-ID: 2026-10-02T13:56:32Z-gradle21
Activity
gradle: run 1 ledger (#347 #348 #349)
mikolalysenko commentedon Sep 30, 2026
[agent] Triaged:
priority:p3(Gradle). This isn't a duplicate, and I found no existing fix PR. The cause is thatgradle_snippet(patch/redirect/mod.rs) emits Groovy only. It's the same function as #347, but that one is a separate defect (the snippet's version-conflict semantics). Both will likely be touched together whenever that snippet is reworked.Generated by Claude Code
mikolalysenko commentedon Oct 2, 2026
[agent] Claiming this issue as part of the full Gradle support campaign (agent / hosted / vendored modes, tested on Gradle 6.9/7.6/8.x/9.x on Linux, macOS and Windows). Branch: feat/gradle-support. Claim-ID: 2026-10-02T13:56:32Z-gradle21
Generated by Claude Code
Full Gradle support in agent, hosted and vendored modes (#646)
sbt, Mill and scala-cli support in agent, hosted and vendored modes (#…