From 4e49f52e65cded496be909c7c098a3f8744f4c80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=B3bert=20Papp=20=28TWiStErRob=29?= Date: Sun, 2 Nov 2025 12:55:07 +0000 Subject: [PATCH 1/2] Fix specific heap requirement of :documentation:asciidoctorPdf Avoids JAVA_TOOL_OPTIONS from overriding -Xmx and therefore not letting the task complete. --- documentation/documentation.gradle.kts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/documentation/documentation.gradle.kts b/documentation/documentation.gradle.kts index 5acf6fd77cb1..99f7bad20205 100644 --- a/documentation/documentation.gradle.kts +++ b/documentation/documentation.gradle.kts @@ -364,6 +364,9 @@ tasks { asciidoctorPdf { setExecutionMode(JAVA_EXEC) // Avoid classpath conflicts with other Gradle plugins (e.g. JReleaser) + jvm { + maxHeapSize = "512M" + } sources { include("user-guide/index.adoc") } From 4cfad9d32d2060700e43d6254240701602ea843d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=B3bert=20Papp=20=28TWiStErRob=29?= Date: Sun, 2 Nov 2025 13:00:45 +0000 Subject: [PATCH 2/2] Remove outdated metaspace workaround for Asciidoctor/JRuby Original workaround was introduced by 00f5e856c017d4b5313f5a354827bbd58e880b12, but later obsoleted by 52497df072f371d1e1acbee626490e30c992c636 --- documentation/documentation.gradle.kts | 4 +++- gradle.properties | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/documentation/documentation.gradle.kts b/documentation/documentation.gradle.kts index 99f7bad20205..df17b9a2b23e 100644 --- a/documentation/documentation.gradle.kts +++ b/documentation/documentation.gradle.kts @@ -363,7 +363,9 @@ tasks { } asciidoctorPdf { - setExecutionMode(JAVA_EXEC) // Avoid classpath conflicts with other Gradle plugins (e.g. JReleaser) + // Avoid classpath conflicts with other Gradle plugins (e.g. JReleaser) + // Avoid propagating apparent memory leaks in Asciidoctor/JRuby to Gradle daemon. + setExecutionMode(JAVA_EXEC) jvm { maxHeapSize = "512M" } diff --git a/gradle.properties b/gradle.properties index cf11159cd350..1a74c14b0915 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,8 +3,7 @@ version = 6.1.0-SNAPSHOT # For backward compatibility checks apiBaselineVersion = 6.0.1 -# We need more metaspace due to apparent memory leak in Asciidoctor/JRuby -org.gradle.jvmargs=-Xmx1g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError +org.gradle.jvmargs=-Xmx1g -XX:+HeapDumpOnOutOfMemoryError org.gradle.caching=true org.gradle.parallel=true org.gradle.configuration-cache.parallel=true