ci: raise Gradle MaxMetaspaceSize to 1g to fix Publish Release OOM#2630
ci: raise Gradle MaxMetaspaceSize to 1g to fix Publish Release OOM#2630sherwinski merged 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
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:MaxMetaspaceSizefrom512mto1gto accommodate Dokka’s class-metadata usage across many submodules.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
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.
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.).
f5ee9a6 to
4d0e676
Compare
Summary
Publish Releaseworkflow failed on 2026-04-28 during the Dry Run - Publish to Maven Local with signing step withjava.lang.OutOfMemoryError: Metaspacewhile running:OneSignal:location:javaDocReleaseGeneration(Dokka).core,in-app-messages,notifications,otel,location, etc.).MaxMetaspaceSizefrom512mto1ginOneSignalSDK/gradle.properties.Failure excerpt
Test plan
Publish Releaseworkflow after merge and confirm the dry-run publish + Dokka tasks complete successfully