dephinera
dephinera

Reputation: 3770

Do we still need to include `kapt com.android.databinding:compiler`

I remember Kotlin mentioning in their docs that we need to include kapt com.android.databinding:compiler:version in our build.gradle. However I can no longer see this mentioned anywhere, except in some medium articles or stack overflow questions. So do we still need to include that if we're using the latest android gradle plugin?

Upvotes: 2

Views: 2371

Answers (2)

jc z
jc z

Reputation: 31

When I migrate kapt to ksp, I find some rules:

1: if your code contains @BindAdapter which is writen in kotlin, you must import kapt in your module!

2: to remove kapt completely, I rewrite those by Java, so I find if your @BindAdaptere writen by java, import kapt in not necessary

Upvotes: 3

Sergey Emeliyanov
Sergey Emeliyanov

Reputation: 6961

As of current documentation, you do not need to specify kapt (Kotlin annotation processor) compiler dependenciy, because the kapt plugin for Gradle/Maven build takes care of it.

Upvotes: 2

Related Questions