FinalizedBy vs DependsOn, difference in "gradle tasks" output

Hi

I have noticed that finlizedBy does not create the task dependency as dependsOn given example below:

task taskX << {
    println 'taskX'
}
task taskY << {
    println 'taskY'
}
  taskX.finalizedBy taskY

“gradle tasks” would result in: taskX taskY

Where changing it to dependsOn

task taskX << {
    println 'taskX'
}
task taskY << {
    println 'taskY'
}
  taskX.dependsOn taskY

“gradle tasks” would result in: tasksY

Is there any way to use dependsOn the way finalizedBy works. In other words I need finilizeBy to hide the tasks like dependsOn does and show dependencies when called gradle tasks --all

Thanks

Mike

It’s the other way around - output for the latter would be ‘TaskX’. I think it would make sense to have the same behavior for ‘finalizedBy’. I’ve created GRADLE-2949 for this.

Ok thanks a lot