feat: configurable worker jvm args#2196
Closed
samuelAndalon wants to merge 3 commits into
Closed
Conversation
### 📝 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Description
cherry-pick #2182