Skip to content

ci: raise Gradle MaxMetaspaceSize to 1g to fix Publish Release OOM#2630

Merged
sherwinski merged 1 commit intomainfrom
fix/gradle-metaspace-publish-oom
Apr 28, 2026
Merged

ci: raise Gradle MaxMetaspaceSize to 1g to fix Publish Release OOM#2630
sherwinski merged 1 commit intomainfrom
fix/gradle-metaspace-publish-oom

Conversation

@sherwinski
Copy link
Copy Markdown
Contributor

Summary

  • The Publish Release workflow failed on 2026-04-28 during the Dry Run - Publish to Maven Local with signing step with java.lang.OutOfMemoryError: Metaspace while running :OneSignal:location:javaDocReleaseGeneration (Dokka).
  • Gradle logged that the configured max Metaspace was 512 MiB, which Dokka exhausts because it loads class metadata for every submodule (core, in-app-messages, notifications, otel, location, etc.).
  • Bumps MaxMetaspaceSize from 512m to 1g in OneSignalSDK/gradle.properties.

Failure excerpt

Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: Metaspace
> Task :OneSignal:location:javaDocReleaseGeneration FAILED
...
* What went wrong:
Execution failed for task ':OneSignal:location:javaDocReleaseGeneration'.
> A failure occurred while executing com.android.build.gradle.tasks.JavaDocGenerationTask$DokkaWorkAction

Test plan

  • CI green on this PR
  • Re-run the Publish Release workflow after merge and confirm the dry-run publish + Dokka tasks complete successfully

Copilot AI review requested due to automatic review settings April 28, 2026 22:41
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adjusts Gradle JVM metaspace settings to prevent CI OOM failures during Dokka/Javadoc generation in the “Publish Release” workflow.

Changes:

  • Increased Gradle daemon -XX:MaxMetaspaceSize from 512m to 1g to accommodate Dokka’s class-metadata usage across many submodules.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

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

LGTM, straightforward CI fix bumping Gradle Metaspace from 512m to 1g to address the documented Dokka OOM.

Extended reasoning...

Overview

This PR makes a single one-line change in OneSignalSDK/gradle.properties, raising -XX:MaxMetaspaceSize from 512m to 1g. It is purely a build-time JVM tuning change to address an OutOfMemoryError observed in the Publish Release workflow during :OneSignal:location:javaDocReleaseGeneration (Dokka).

Security risks

None. This is build configuration that only affects the Gradle daemon's JVM memory limit during local/CI builds. It does not touch any product code, dependencies, signing, or release artifacts.

Level of scrutiny

Minimal scrutiny is appropriate. The change is mechanical, the failure is well-documented in the description with an excerpt, and the fix matches the diagnosed cause (Dokka loading metadata across many submodules exhausts Metaspace). -Xmx4096m is unchanged, so total memory pressure on CI runners remains bounded.

Other factors

No prior reviewer comments. No bugs were flagged by the bug hunting system. The only follow-up is verifying the Publish Release workflow runs green after merge, which is already captured in the PR's test plan.

@sherwinski sherwinski changed the title fix(ci): raise Gradle MaxMetaspaceSize to 1g to fix Publish Release OOM ci: raise Gradle MaxMetaspaceSize to 1g to fix Publish Release OOM Apr 28, 2026
The Publish Release workflow was failing during Dokka's
javaDocReleaseGeneration with OutOfMemoryError: Metaspace. The 512 MiB
cap is exhausted as Dokka loads class metadata across all submodules
(core, in-app-messages, notifications, otel, location, etc.).
@sherwinski sherwinski force-pushed the fix/gradle-metaspace-publish-oom branch from f5ee9a6 to 4d0e676 Compare April 28, 2026 22:44
@sherwinski sherwinski merged commit dee2c10 into main Apr 28, 2026
4 of 5 checks passed
@sherwinski sherwinski deleted the fix/gradle-metaspace-publish-oom branch April 28, 2026 22:51
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.

4 participants