Skip to content

feat: configurable worker jvm args#2196

Closed
samuelAndalon wants to merge 3 commits into
masterfrom
feat/10.x.x/configurable-worker-jvm-args
Closed

feat: configurable worker jvm args#2196
samuelAndalon wants to merge 3 commits into
masterfrom
feat/10.x.x/configurable-worker-jvm-args

Conversation

@samuelAndalon

Copy link
Copy Markdown
Contributor

📝 Description

cherry-pick #2182

Samjin and others added 3 commits June 18, 2026 12:07
)

Cherry pick #2178 to `v10.x.x` branch.

Co-authored-by: sjin <sjin@expediagroup.com>
### 📝 Description
cherry pick #2183

Co-authored-by: Samuel Vazquez <samvazquez@expediagroup.com>
…2182)

## 📝 Description

`GraphQLGenerateSDLTask` runs SDL generation in a process-isolated
worker (`workerExecutor.processIsolation`), but the worker's
`forkOptions` only set the executable — there is no way to configure its
heap or any other JVM argument. The worker therefore runs with the
Gradle default heap, and large schemas exhaust it and fail with
`java.lang.OutOfMemoryError: Java heap space` with no supported
workaround.

This PR adds an optional `jvmArguments` property to
`GraphQLGenerateSDLTask`, applies it to the worker's `forkOptions`, and
exposes it through the `graphql { schema { } }` DSL (and the
`--jvm-args` CLI option).

```kotlin
graphql {
  schema {
    packages = listOf("com.example")
    jvmArguments = listOf("-Xmx2g")
  }
}
```

It defaults to an empty list, so existing builds are unaffected.

Closes #2181

## 🔗 Related Issues

Closes #2181

## ✅ Checklist

- [x] Added tests (`GraphQLGenerateSDLTaskTest`: default value + DSL →
task propagation)
- [x] Updated documentation (`gradle-plugin-tasks.mdx`,
`gradle-plugin-usage-sdl.mdx`)
- [x] `./gradlew :graphql-kotlin-gradle-plugin:check ktlintCheck detekt`
pass locally
- [x] Backward compatible (no behavior change when `jvmArguments` is
unset)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@samuelAndalon samuelAndalon deleted the feat/10.x.x/configurable-worker-jvm-args branch July 1, 2026 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants