Closed BrianGardnerAtl closed 4 months ago
The second issue is that paparazzi is not loading the processed layout files which is why it's erroring when parsing the layout tag. I found an additional resource directory under build/intermediates/packaged_res/debug that has the processed layouts. Adding this to the projectResourceDirs in the paparazzi plugin allows the correct layout to load.
Yea, this will be partly fixed in https://github.com/cashapp/paparazzi/pull/1136
Related to #1016
BR
class when using the<data>
tagDataBindingMapperImpl
instead of requiring consumers to add one themselvesTwo issues I ran into trying to fix this. The first is that attempting to access any data binding from the test results in a class not found for
DataBindingMapperImpl
. One does get generated but it is not accessible. I found a similar issue related to Roboectric where one of the posts mentioned creating a fake version of the class and adding the actual version via reflection which worked. Here is the example version. I tweaked the implementation since we are unable to query the application package name from the unit test variant.The second issue is that paparazzi is not loading the processed layout files which is why it's erroring when parsing the
layout
tag. I found an additional resource directory underbuild/intermediates/packaged_res/debug
that has the processed layouts. Adding this to theprojectResourceDirs
in the paparazzi plugin allows the correct layout to load. important this has to be the last resource directory. I tried having it first but it was defaulting to the original, unprocessed layout which fails on thelayout
tag.