Your task has no task action, the exec call is executed during configuration phase. Furthermore, the mustRunAfter is superfluous because dependsOn is much stronger. This is maybe what you want:
tasks.register("hello") {
dependsOn("wrapper")
doLast {
exec {
commandLine("ls")
}
}
}