Gradle - equivalent of test {} configuration block for android : <p>Gradle has the test configuration block </p>

<p><a href="https://docs.gradle.org/current/dsl/org.gradle.api.tasks.testing.Test.html" rel="noreferrer">https://docs.gradle.org/current/dsl/org.gradle.api.tasks.testing.Test.html</a></p>

<p>```</p>

<pre><code>apply plugin: 'java' // adds 'test' task

test {
  // enable TestNG support (default is JUnit)
  useTestNG()

  // set a system property for the test JVM(s)
  systemProperty 'some.prop', 'value'

  // explicitly include or exclude tests
  include 'org/foo/**'
  exclude 'org/boo/**'

  // show standard out and standard error of the test JVM(s) on the console
  testLogging.showStandardStreams = true

  // set heap size for the test JVM(s)
  minHeapSize = "128m"
  maxHeapSize = "512m"

  // set JVM arguments for the test JVM(s)
  jvmArgs '-XX:MaxPermSize=256m'

  // listen to events in the test execution lifecycle
  beforeTest { descriptor -&gt;
     logger.lifecycle("Running test: " + descriptor)
  }

  // listen to standard out and standard error of the test JVM(s)
  onOutput { descriptor, event -&gt;
     logger.lifecycle("Test: " + descriptor + " produced standard out/err: " + event.message )
  }
}
</code></pre>

<p>where one can set all sorts of test configuration (I am mostly interested in the heap size). Is there something similar for android projects?</p>
