https://kotlinlang.org logo
Title
l

Lucas

05/25/2018, 4:18 PM
@mkobit So there is not a workaround, right? Just choosing another plugin that's more Kotlin friendly.
c

Czar

05/25/2018, 4:20 PM
you could create an issue for them or do a PR with needed refactoring, but from the looks of their issue tracker, their development cycle is kinda slow, so YMMV. Alternatively you could put the plugin configuration in a groovy file and apply it in kts. If you don't have specific requirement to use it and don't want to have groovy dsl at all, using something more kotlin-friendly would be your best bet.
m

mkobit

05/25/2018, 4:22 PM
the kotlin workaround would be ugly it might look like (untested)
git {
  methodMissing("git, delegateClosureOf<GitAdapter> {
  }
}
but i dont think configuring the
GitAdapter
looks nice either because so much of that plugin is built around dynamicness of groovy you could also probably just put this part in a groovy gradle file and apply it from your
kts
l

Lucas

05/25/2018, 4:43 PM
Using the
methodMissing
doesn't seems to be a solution because the
requireBranch
property is from a class named
GitConfig
that's inside
GitAdapter
. Using a pure Groovy Gradle file worked and it's easier. Thank you so much @Czar and @mkobit!
👍 2