Translation of a build.gradle script to Kotlin

Hello,
could someone help me to translate in kotlin (build.gradle.kts) this groovy script https://github.com/ligi/ipfs-api-kotlin/blob/master/build.gradle ? I would greatly appreciate as I failed to achieve it.
Thanks
Emile