According to Groovy doc, Example 40.2, a new class for a task should be created so (simply copy that to the build.gradle):
task hello(type: GreetingTask)
class GreetingTask extends DefaultTask {
@TaskAction
def greet() {
println 'hello from GreetingTask'
}
}
But if you really try to do it, the class declaration is marked as an erroneous because no abstract methods are written. About ten of them should be here... Is it really impossible to do a task class in a cheap way as in documentation? What is the problem with documentation? Or rather with some settings on my IntelliJ?