-
Notifications
You must be signed in to change notification settings - Fork 37
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
Missing adapters in AGP 7.4 with Moshi-ir codegen. #396
Comments
Can you put together a minimally reproducing sample? I can't help much without one |
Interesting, I saw adapters disappear after updating Gradle 7.6 -> 8.0.0 |
We did Gradle 8 update as well. So maybe I've just wrongly debugged the issue. How did you solve the mising adapters with Gradle 8? |
Okay. I have a reproduction. Basically it seems to be triggered by using "realm-android" plugin with its new transformer API, which is a must for Gradle 8.0. Just adding the plugin makes the release build type crash with a missing adapter. Attaching repro. Disabling minification "fixes it". |
Didn't you have a chance to take a look at the reproduction? Thank you. |
Your repro doesn't have any instructions on how to build it and contains no gradle wrapper files. I added some and see the same behavior. I think you answered it for yourself - the realm plugin is somehow removing or losing the generated adapter class. You should file a bug with them, this isn't a moshi-ir issue |
@ZacSweers The proguard configuration created from the MoshiX-plugin is not registered as input for the |
I am not familiar with realm or the transformer API it's using |
The transformer API is part of Android Gradle Plugin, so not Realm specific. The task infrastructure was reworked quite heavily from AGP 7.2 -> 7.4, so I just suspect that the conventions for locating |
We are using it with AGP 7.4 and 8.0 without issues. This also only appears to occur when the realm plugin is applied and not with any other plugins (we have some bytecode processing plugins at my work). I'm not against fixing a bug if there is one here, but currently I'm not seeing it or an obvious better thing to do :/ |
Might be that we are not forwarding the inputs/outputs correctly in the new pipeline, but I just couldn't see any paths, API or conventions around handling things other than the ones intended to go into the final jar. Will have to debug and see the various pieces in action to get an idea of what is missing in wiring it up. |
Hi, we have a problem with R8 minification and JsonAdapters missing in the build (generated by moshi ir). Do you have any idea where the issue can be? I've tried searching issuetracker.google.com and here, but haven't found anything useful.
Started being broken after the update to AGP 7.3.2->7.4.2:
Libs used:
Error:
This fixes it for us:
The text was updated successfully, but these errors were encountered: