build.gradle
plugins { id 'com.android.application' version '8.10.1' apply false }
// Robolectric loads multiple instrumented Android SDKs and native graphics in
// one worker. Size that heap separately from the lighter library tests and the
// Gradle daemon; do not multiply it by running several app workers concurrently.
allprojects {
tasks.withType(Test).configureEach {
maxHeapSize = project.path == ':app' ? '8g' : '1g'
maxParallelForks = 1
}
}