I have tried migrating to a new Gradle Plugin, but since we have some custom layouts for AndroidTests, it fails with an error saying "R class was not found" for the android tests. I could not find any source saying about any behaviour changes in this area.
The error looks like this and seems to be related to view inding or simply to the fact the R class is not generated.
/pathToTheApp/build/generated/data_binding_base_class_source_out/debugAndroidTest/out/com/package1/test/databinding/CustomViewActivityBinding.java:12: error: cannot find symbol
import package.name.test.R;
^
symbol: class R
location: package package.name.test