Could not initialize class com.android.build.gradle.internal.test.report.AllTestResults

I am running connectedCheck task on this project: https://drive.google.com/open?id=0B8N7eNBQDyBdQUh2SFdYOWhnZm8

I get the following error:

FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ‘:app:connectedDebugAndroidTest’.
Could not initialize class com.android.build.gradle.internal.test.report.AllTestResults
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Get more help at https://help.gradle.org

This project in Android Studio is being built with Gradle 4.2 and android gradle plugin 3.0.0-beta7. Does anybody know what is causing this?

UPDATE: the issue seems to be resolved with Gradle 4.3-rc-1. It is explained better in this Github post: https://github.com/gradle/gradle/issues/3006