New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tests fails when using AndroidX font-family #488
Comments
@magnusvs thanks for reporting! I tried to reproduce your issue with the current codebase and wasn't able to. Here's what I did:
Could you try the same on our local and post your results? Also, if that is not the right way to simulate your issue could you provide some test cases? Thanks! |
Hi, Sorry for the late response @fcduarte . I'm trying it out locally today but I'm just hitting errors compiling and can't manage to run tests at the moment. First couldn't sync project with
Not too familiar with this maven publishing plugin so haven't gotten around it yet. Back to the issue, if I remember everything correctly, I think on your step 2 is where it's different from my own project setup. "and changed all references Just to expand on the initial report: |
Tried removing the method interceptor and the test still breaks due to the original issue. See comment here: https://issuetracker.google.com/issues/156065472#comment3 |
Solution is to use ASM to apply a transform similar to the one used by Android Studio: https://issuetracker.google.com/issues/156065472#comment4. Any volunteers? |
Hey @jrodbx 👋🏼 I would like to give this issue a try.
Can you elaborate on this approach? |
Picking this up |
Description
It seems like
ResourcesInterceptor
overrides to use the platform Resources.getFont instead of the AndroidXResourcesCompat
. This causes a problem when using a font-family that only specifiesapp:
attributes, instead ofandroid:
attributes.Steps to Reproduce
Use an AppTheme that sets
textAppearance
with a font-family like:By adding
android:
prefix the tests can inflate everything again.Expected behavior
It seems like the behaviour was added because of this bug https://issuetracker.google.com/issues/156065472 which now is supposed to be fixed. Could the Interception be removed?
Additional information:
Screenshots
The text was updated successfully, but these errors were encountered: