When using Kotlin 2.0.0-RC1 with useKsp it will fail with:
java.lang.NoClassDefFoundError: org/jetbrains/kotlin/gradle/plugin/mpp/pm20/util/TargetsKt
at com.squareup.anvil.plugin.AnvilExtension$useKsp$willHaveDaggerFactories$1.invoke(AnvilExtension.kt:205)
at com.squareup.anvil.plugin.AnvilExtension$useKsp$willHaveDaggerFactories$1.invoke(AnvilExtension.kt:202)
at com.squareup.anvil.plugin.AnvilExtension.useKsp$lambda$4(AnvilExtension.kt:202)
The used targets extension method still exists in but the file name changed which leads to the NoClassDefFoundError. Since it's deprecated now and since the replacement is internal it's probably best to just directly replace it
When using Kotlin 2.0.0-RC1 with
useKsp
it will fail with:The used
targets
extension method still exists in but the file name changed which leads to theNoClassDefFoundError
. Since it's deprecated now and since the replacement is internal it's probably best to just directly replace it