Anyone know how I use kapt with kotlin-gradle-dsl
# kapt
j
Anyone know how I use kapt with kotlin-gradle-dsl
g
If you have Kotlin plugin in build classpath just apply kapt plugin;
plugins.apply("kotlin-kapt")
. If you don’t, just add plugin:
Copy code
kotlin("kapt") version "1.1.61"
j
Its not a problem getting the plugin registered, its how to use it that I don't understand
g
What do you mean? Just use
kapt
configuration in your dependencies
j
In normal gradle you then in the dependencies mark one as
kapt 'mydep'
g
Yes, you can do that too with kotlin-dsl
j
But I can't find the function to use,
kapt
isn't in scope
g
Do you use syntax kapt("mydep")?
Maybe @yan could take a look. Also, maybe make sense to update kapt dsl to be more friendly for kotlin-dsl. I would be happy to contribute
Sorry, will reopen again for develop branch
Updated PR
y
Please submit an issue about Kotlin DSL support in kapt dsl :)
g
Thanks, will do