Skip to content
Discussion options

You must be logged in to vote

Yes, it's possible to fail the build if KSP (Kotlin Symbol Processing) is not properly configured but the @JsonClass(generateAdapter = true) annotation from Moshi is used. Currently, the default behavior in this scenario is that the adapter is not generated, and there is no explicit failure of the build, which can lead to runtime errors due to missing adapters.

To force the build to fail when this happens, you can take the following approach:

  1. Use a Gradle Task to Check KSP Configuration
    You can add a custom Gradle task to check whether KSP is correctly configured. This task could verify if the necessary KSP dependencies are included in the build or check if generated adapters exist after…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ZacSweers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants
Converted from issue

This discussion was converted from issue #1778 on October 01, 2025 20:41.