Dependency's dependency does not get executed

I am using gradle from long time, but I am facing one issue from long long time The thing is that if I have task A which dependsOn task B, and task B dependsOn task C. Now if I run task Z which executes task A, it does not execute task C and task B. Is it a bug or am I doing something wrong? I have to add task C, task B as dependencie in task Z.

When you say ‘task Z which executes task A’, what do you mean?

Does ‘Z’ dependon ‘A’? Or are you calling ‘A.execute()’ inside Z? The latter is not really supported or recommended, and will not execute the dependencies of A.

Yes, Z dependsOn A … I am not calling A.execute()

I’d say it’s rather unlikely that it is a bug. Can you provide a self-contained, reproducible example?

yes, I will prepare one and will post it.