Reputation: 1936
Recent version of Moshi (1.15.0) is issuing a warning
Kapt support in Moshi Kotlin Code Gen is deprecated and will be removed in 2.0. Please migrate to KSP. https://github.com/square/moshi#codegen"
This happens when Hilt is used as Hilt configures the annotation processor classpath of the hiltJavaCompile to be a mirror of the kapt and ksp configurations. This however triggers the aforementioned warning in Moshi:
processingEnv.messager.printMessage(Diagnostic.Kind.WARNING, "Kapt support in Moshi Kotlin Code Gen is deprecated...")
The issue is mentioned in dagger (https://github.com/google/dagger/issues/4116) and Moshi projects (https://github.com/square/moshi/discussions/1752).
Our project has javac flag -werror set i we would like to avoid removing it.
Is there any way in Gradle to suppress just this specific warning? So far I tried using ContextAwareTaskLogger.MessageRewriter
but this message was not intercepted at all.
Upvotes: 2
Views: 83