I have a series of task that runs node to generate one file output from one file input. The tasks successfully complete the “first” time, but after a ‘gradle clean’ removes the outputs, further builds claim the task is up-to-date. “gradle --debug” doesn’t help - it prints very little information - basically that it is starting the up-to-date check and that it has completed.
Is there a way to get Gradle to tell you why it thinks the task is up to date? i.e., to let me know that it is considering the right inputs and outputs, that the checksums haven’t changed, does it consider creation times?
Why does it think the task is up to date when the output files aren’t present?
Suggestions on how to debug this would be appreciated.
webpack_iad {
dependsOn compileTypescript
inputs.file file('webpack.config-client.js')
outputs.file file("$buildDir/dist/xforms.js")
inputs.files.each { println "IAD : in : $it.absolutePath" }
outputs.files.each { println "IAD : out : $it.absolutePath" }
}
Relevant part of ‘gradle -a webpack_iad --debug’ (including the debug output)
IAD : in : C:\jdev\xforms\webpack.config-client.js
IAD : out : C:\jdev\xforms\build\dist\xforms.js
10:20:02.781 [INFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :xforms:webpack_iad (Thread[main,5,main]) started.
10:20:02.796 [LIFECYCLE] [class org.gradle.TaskExecutionLogger] :xforms:webpack_iad
10:20:02.796 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Starting to execute task ':xforms:webpack_iad'
10:20:02.796 [DEBUG] [org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter] Determining if task ':xforms:webpack_iad' is up-to-date
10:20:02.796 [INFO] [org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter] Skipping task ':xforms:webpack_iad' as it is up-to-date (took 0.0 secs).
10:20:02.812 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':xforms:webpack_iad'
10:20:02.812 [LIFECYCLE] [class org.gradle.TaskExecutionLogger] :xforms:webpack_iad UP-TO-DATE
10:20:02.812 [INFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :xforms:webpack_iad (Thread[main,5,main]) completed. Took 0.016 secs.