Exception in thread "Memory manager" java.lang.OutOfMemoryError: Java heap space in Jenkins

Jmix 1.5
I have to make a jenkins build I bascially run

gradle :my-app:bootJar -org.gradle.jvmargs=-Xmx4096m -PpremiumRepoUser=BUILD_USER -PpremiumRepoPass=BUILD_PASSWORD

Is this correct?

Hi

Yes, this is valid approach.
In our team we just set this org.gradle.jvmargs=-Xmx4G option in the main gradle.properties file.

not working

adding a -D instead of the P

gradle :my-app:bootJar -Dorg.gradle.jvmargs=-Xmx4096m -PpremiumRepoUser=BUILD_USER -PpremiumRepoPass=BUILD_PASSWORD

worked

Yes, sorry this is not for CI builds