In order to provide flexibility to users, I want to provide synonyms for task names e.g dropDb, dbDrop, dropAllDbs, dbDropAll etc.
I am creating tasks and not task classes. So everytime I create a task(in this case dbDrop), I have to create a task for rest of the names this task can have and I have to add description and group to those and then I have to add dependsOn dropDb statement to that task.
task dropDb(){
description "Drops all DBs"
group "Database related tasks"
doLast {
}
}
task dbDrop(){
description "Drops all DBs"
group "Database related tasks"
dependsOn dropDb
}
Similarly for rest of the names I want to give this task.
I understand that we can create a custom Task class and can handle this issue by using (type: ) thingy. But
is there /can there be an easier way we can provide synonyms for the tasks that we create?