Repository navigation
Raise the Gradle daemon heap to 4 GB - #612
Merged
Merged
Conversation
CircleCI build_and_test sometimes fails with OutOfMemoryError: Java heap space in :example:packageDebug. The job runs check, build, and assembleAndroidTest in one Gradle run, and 2 GB is not always enough. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
stevepopovich
marked this pull request as ready for review
November 19, 2026 20:49
alanjcharles14
approved these changes
Nov 19, 2026
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.
Summary
The CircleCI
build_and_testjob sometimes fails withjava.lang.OutOfMemoryError: Java heap spacein:example:packageDebug. The same commit can pass on a rerun.The job runs
./gradlew check build assembleAndroidTestin one Gradle run (267 tasks). The Gradle daemon heap is 2 GB (-Xmx2048M), and this is not always enough. The job uses thexlargeresource class, which has 16 GB of memory.This PR raises the Gradle daemon heap to 4 GB. The Kotlin daemon stays at 2 GB, because the error was in the Gradle daemon.
Tests
./gradlew check build assembleAndroidTestpasses locally, and the Gradle daemon runs with-Xmx4096M.🤖 Generated with Claude Code