What means message 'what means task has not declared any outputs'?


(aleksg) #1

There is for instance simple task like

task echoBuildParameters {
doLast {
println project.myprop
}
}

During execution seen the output message

‘Task has not declared any outputs’

What does it mean this message?


(Stefan Wolf) #2

This message means that the task did not declare its outputs. Gradle uses the inputs and the outputs of a task to determine if the task needs to be executed or not (up-to-date).
For more information have a look at the corresponding userguide section: https://docs.gradle.org/4.0/userguide/more_about_tasks.html#sec:up_to_date_checks.


(aleksg) #3

Thank you for helping, Stefan!