How to remove xmx default value added by gradle when forking a process to execute test?


In my Android Project, I have the fellowing configuration.

unitTests.all {
       jvmArgs '-noverify', "-XX:+UseContainerSupport,

I don’t want specify the xmx parameter because my tests are executed inside a Docker container. I use instead -XX:+UseContainerSupport to let jvm defines a memory limit, and adjusts the maximum Java heap size appropriately

In CI on my Android project, the Process 'Gradle Test Executor 2' finished with non-zero exit value 134. Test are executed in a Docker container. After analyzing, I discovered that gradle add -xmx512m if maxHeapSize isn’t set. I note that setting** -Xmx and -Xms disables the automatic heap sizing via -XX:+UseContainerSupport.

Is it possible to say to gradle to not add the default memory configuration -Xxmx if not explicitly defined?