I need to convert a gradle build script, which is written in Groovy, into Kotlin. The problem is, that in the Groovy build file in one task another task, which was defined before, is executed. However, it appears that in Kotlin there is no support for that, at least I could not find any in the API.
I have studied the API and searched for similar problems, but I could not find anything useful.
The Groovy code looks like this:
task doSomething () {
...
}
task anotherTask () {
...
doSomething.execute()
...
}
How would this call be translated into Kotlin?
doSomething.execute()
executeis not available in Gradle anymore (since 5.0), so this is not caused by a difference between Groovy and Kotlin. It is often found in older builds, but should actually never be used, because it may interfere with the Gradle task execution system.