Creating task in root project fails


(sreenivas karthikeyan) #1

Hi,

I’m trying to create a task in root project

allprojects {
task hello << {task -> println “I’m $task.project.name” }
}

but it fails with below error

  • What went wrong:
    A problem occurred evaluating root project ‘Test’.

Could not find property ‘hello’ on root project ‘Test’.


(sreenivas karthikeyan) #2

Oh, It was a silly mistake
Works well now.
Thanks a lot