Skip to content

Raise the Gradle daemon heap to 4 GB - #612

Merged
stevepopovich merged 1 commit into
masterfrom
stevenpopovich/raise-gradle-heap
Nov 19, 2026
Merged

stevepopovich merged 1 commit into
masterfrom
stevenpopovich/raise-gradle-heap

Conversation

@stevepopovich

Copy link
Copy Markdown
Contributor

Summary

The CircleCI build_and_test job sometimes fails with java.lang.OutOfMemoryError: Java heap space in :example:packageDebug. The same commit can pass on a rerun.

The job runs ./gradlew check build assembleAndroidTest in one Gradle run (267 tasks). The Gradle daemon heap is 2 GB (-Xmx2048M), and this is not always enough. The job uses the xlarge resource 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 assembleAndroidTest passes locally, and the Gradle daemon runs with -Xmx4096M.
  • The CircleCI run on this PR is the real check.

🤖 Generated with Claude Code

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
stevepopovich marked this pull request as ready for review November 19, 2026 20:49

@alanjcharles14 alanjcharles14 left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, just re-ran the ci on your other PR but maybe that was premature. sorry!

@stevepopovich
stevepopovich merged commit 6b4c936 into master Nov 19, 2026
2 checks passed
@stevepopovich
stevepopovich deleted the stevenpopovich/raise-gradle-heap branch November 19, 2026 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants