From 0f64a765678186ea7e998f35e0735827eb306ad3 Mon Sep 17 00:00:00 2001 From: tanya732 Date: Thu, 3 Sep 2026 12:03:44 +0530 Subject: [PATCH] chore: update build file wirh forkOptions --- build.gradle | 10 ++++++++++ gradle.properties | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/build.gradle b/build.gradle index cbfbfb8db..105fdbeca 100644 --- a/build.gradle +++ b/build.gradle @@ -49,6 +49,16 @@ java { sourceCompatibility = 1.8 targetCompatibility = 1.8 +// The Management API client is Fern-generated (~4000 types). javac's type +// inference over that tree exhausts the compiler's default heap. Because the +// Java 8 toolchain differs from the JDK running Gradle, javac is forked into a +// separate process, so org.gradle.jvmargs (the daemon heap) does not apply — +// the heap must be set on the forked compiler here. +tasks.withType(JavaCompile).configureEach { + options.fork = true + options.forkOptions.memoryMaximumSize = '2g' +} + jar { manifest { attributes 'Automatic-Module-Name': 'com.auth0.java' diff --git a/gradle.properties b/gradle.properties index cb426bef4..724f91f7f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,7 @@ +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +org.gradle.jvmargs=-Xmx1536m + GROUP=com.auth0 POM_ARTIFACT_ID=auth0 VERSION_NAME=3.0.0