I'm converting a script to kotlin dsl. What is the...
# gradle
j
I'm converting a script to kotlin dsl. What is the correct syntax of kapt?
kapt("group:name:version")
results in
inferred type is String but Action<KaptExtension> was expected
d
That is the correct syntax. I think the calling context has confused the compiler.
As a quick workaround you can do
"kapt"("group:name:version")
.
o
frequently the generated accessors may also not properly generate, in which case "kapt" is the only option
j
Got it. thanks!
g
frequently
I didn't see cases when type safe accessors are not generated for a long time, most probably you have wrong configuration
Looks that you applying it not in DependencyAware block
g
Unwrap from Libraries.Android.apply and try again
j
Same issue
g
Now I see, you use dynamic syntax for kapt configuration, looks that it doesn't work at all, otherwise you could use type safe accessor anyway, looks that something is broken with Kapt application, but not sure what, everything looks fine for me
Probably somehow related on that you use MPP plugin