How to use distribution plugin with the kotlin dsl

(Alexandre Navarro) #1


I tried to use the distribution plugin with the kotlin dsl but I failed.
Do you have any sample or basic syntax with kotlin dsl.

Globally, I want to migrate from maven to gradle with kotlin dsl (which seems the target for gradle) and I’m quite surprised on different things :

  1. Quasi all the documentation use groovy syntax, not kotlin syntax, it is more difficult when you want to migrate from maven in addition to understand how works gradle to find so little documentation on kotlin dsl. I just found mainly the samples in kotlin-dsl to help me (but it not covered everything).
    What is the best way to have documentation on kotlin-dsl or use effectively kotlin-dsl?
    Is it possible to add progressively in your documentation snippet in kotlin and groovy (not only in groovy)? For information, I added an issue to sample on distribution plugin on kotlin-dsk (

  2. The gradle init does not work with --dsl kotlin (, it generates groovy dsl.

  3. Sometimes there are several plugins which are doing quite same thing but quite difficult for a newbie to see which to choose.
    Ex : maven vs maven-publish
    Target : ask on the forum, maven-publish is the target plugin.
    Ex : java vs java + application vs java-library ?
    Target : Use java-library for java lib and java + application for end final application.
    You should add more documentation on that.

Thanks in advance, sorry if I’m tough, it was not my intention, I just want to have a win-win.

(Alexandre Navarro) #2

The answer is in this issue I created