java.lang.OutOfMemoryError: Java heap space

For large projects with many classes to parse, the default JVM heap size might not suffice. If you encounter java.lang.OutOfMemoryError: Java heap space error consider increasing the maxHeapSize for the test source set:

Add the following argument to thebuild.gradle.kts file:

tasks.withType<Test> {
    maxHeapSize = "1g"
}

You may need to set larger value than 1 gigabyte.

Last updated