This message was deleted.
# community-support
s
This message was deleted.
d
looks like a groovy code sample
j
Hmm I thought that might be the issue - I have 0 kotlin currently. Shouldn't "current" be kotlin though?
d
🤷 i still do all of my gradle work in groovy
d
kotlin needs double quotes for strings
j
But can the documentation be that broken?
a
This JavaDoc is generated from the code, see: https://github.com/gradle/gradle/blob/2805c3fda24da90bb9544ec197335259d983b2cd/subprojects/core/src/main/java/org/gradle/api/tasks/Exec.java#L20-L43 In the code there are still some examples that were not converted from Groovy unfortunately 😞
j
Interesting. Any suggestions for Kotlin examples?
Since I don't know either groovy or Kotlin at this stage maybe I should switch to groovy for now.
d
groovy may be a little more tested but here is my best guess at a kotlin equivalent for now
j
Excellent, thanks. I saw the "register" syntax somewhere else and was very confused.
It builds, at least. Thanks for the help.
d
i try to keep up to date with the api improvements - they really improve perf/usability, but kotlin as a language i have not yet figured out fully
j
resumes the Kotlin course
✅ 1
v
Since I don't know either groovy or Kotlin at this stage maybe I should switch to groovy for now.
Definitely not. With Kotlin you get type-safe build scripts, actually helpful error messages if you mess up syntax unlike wiith Groovy, and amazingly better IDE support when using a proper IDE like IntelliJ IDEA.
I saw the "register" syntax somewhere else and was very confused.
The "register syntax" is not Kotlin specific. It should also be used in Groovy. The example you refer to is just very outdated. For more about the "register syntax" have a look at https://docs.gradle.org/current/userguide/task_configuration_avoidance.html
j
\o/ my task is executing
👌 1