I just started learning gradle. Tried to create a simple task as shown below:
["ab","cd","ef"].each { flavor ->
task hi {
doLast {
"println ${flavor}"
}
}
}
while excuting above task ,getting error: Cannot add task ‘hi’ as a task with that name already exists.
Can someone please tell me where i am going wrong?