As this bug commenter pointed out:
https://issuetracker.google.com/issues/77605097#comment7
disabling the "configure on demand" feature of Gradle (in Settings: Build, Execution, and Deployment: Compiler) is a viable workaround.
Since I did this my Unit tests are all working again.