You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way to disable the adapter code generation?
something similar to @JsonClass(generateAdapter = false) in Moshi code gen.
its especially useful in debug builds since we need fast iteration. (Moshi also provides Kotlin Reflect Adapter which we can make use of in debug build tool)
The text was updated successfully, but these errors were encountered:
Use releaseAnnotationProcessor or check if (properties.containsKey('android.injected.invoked.from.ide')) before adding the regular annotationProcessor dependency.
releaseAnnotationProcessor is a good way to block the code gen.
but then I have to make my Moshi builder flavored specific(release and debug), in order to overcome the generation of KotshiApplicationJsonAdapterFactory() class in release builds only.
The answer is no, there is no way besides not applying the processor. As you mention you would have to have a separate factory in another source set. I will consider adding this feature when I switch to generating Kotlin code.
Is there a way to disable the adapter code generation?
something similar to
@JsonClass(generateAdapter = false)
in Moshi code gen.its especially useful in debug builds since we need fast iteration. (Moshi also provides Kotlin Reflect Adapter which we can make use of in debug build tool)
The text was updated successfully, but these errors were encountered: