Has anyone written a gradle plugin in Kotlin that ...
# gradle
j
Has anyone written a gradle plugin in Kotlin that leverages jetbrains code completion?
g
what is “jetbrains code completion”?
g
hmmm
what do you mean?
You don’t have code completion when writing Gradle plugin in Kotlin?
something broken than, works for me without issues
j
No I'm talking about writing my own Gradle plugin
g
So, you write own Gradle Plugin and you want that users of this plugin have code completion in Gradle Kotlin DSL configs, correct?
j
That's correct
g
If you will use recommended approaches for writing Gradle plugin you don't need any additional support, just define tasks, use extensions instead of conventions, avoid any dynamic groovy api
And Gradle will do most of work for you and Kotlin DSL consumers will have code complications if also follows recommendations
You can find a lot of useful information and advices in official migration guide that also explains when consumer will have access to type safe api of plugins https://guides.gradle.org/migrating-build-logic-from-groovy-to-kotlin/#configurations-and-dependencies
j
Awesome thank you!!!