maiflai / gradle-scalatest

A plugin to enable the use of scalatest in a gradle Scala project.
The Unlicense
73 stars 35 forks source link

Provide xmx parameter for scalatest #86

Closed atais closed 3 years ago

atais commented 3 years ago

Hello

I am migrating Scala project from maven to gradle. In previous configuration we had

<plugin>
  <groupId>org.scalatest</groupId>
  <artifactId>scalatest-maven-plugin</artifactId>
  <configuration>
    <argLine>JAVA_OPTS=Xmx=2g</argLine>
  </configuration>
</plugin>

and I cannot find a way to setup java opts with this wrapper. Is it possible at all?

maiflai commented 3 years ago

It should respect the Test configuration from https://docs.gradle.org/current/dsl/org.gradle.api.tasks.testing.Test.html

Have you tried the following?

test {
  maxHeapSize = "2g"
}
atais commented 3 years ago

Wow, I did not expect configuration from the main gradle testing plugin to have impact here! You might want to add such one-liner to the readme :-) or maybe it is just not obvious for gradle newbie, don't know.

Anyways, I have ended up using:

test {
  jvmArgs '-Xmx2g'
 }

which I think does the same and it works. Thanks a lot!