Hi guys! I'm trouble trying to have a gradle task ...
# gradle
l
Hi guys! I'm trouble trying to have a gradle task in separated file..
Copy code
class GreetingTask : DefaultTask() {

    @TaskAction
    fun doHelloWorld() = println("Hello World!")
}
Copy code
class GreetingPlugin : Plugin<Project> {

    val TASK_NAME = "greeting"

    override fun apply(project: Project) {
        project.tasks.create(TASK_NAME, GreetingTask::class.java)
    }
}
the problem is, in the command line I type:
gradlew greeting
and I got the following error
Copy code
FAILURE: Build failed with an exception.

* What went wrong:
Task 'greeting' not found in root project 'cx-auth'.
can someone help me?