There is some issue related in how the processed classes from the transformer are fed into the unit test task that does not allow the runner to resolve them.
Because Realm is not available in JVM and unit tests, disabling the Realm transformer has the same effect as applying the transformer on a Unit test, tests would only be able to use unmanaged versions of the objects.
This PR fixes https://github.com/realm/realm-java/issues/7771 by disabling the transformer API on Unit Test components.
There is some issue related in how the processed classes from the transformer are fed into the unit test task that does not allow the runner to resolve them.
Because Realm is not available in JVM and unit tests, disabling the Realm transformer has the same effect as applying the transformer on a Unit test, tests would only be able to use unmanaged versions of the objects.
Filed issue in google tracker: https://issuetracker.google.com/issues/270885482
The PR also fixes https://github.com/realm/realm-java/issues/7736 that prevented instrumented tests to run because of the Realm dependencies being not present in the configuration.