It seems to me like it is not possible to get the list of changed files from the inputs of the compileJava
task.
I am getting errors like this:
> No signature of method: org.gradle.api.internal.tasks.DefaultTaskInputs.outOfDate() is applicable for argument types: (build_273udxpl4koqk76bwhxcr9g4y$_run_closure4$_closure20$_closure34$_closure35) values: [build_273udxpl4koqk76bwhxcr9g4y$_run_closure4$_closure20$_closure34$_closure35@27b9ba1e]
or:
> Cannot cast object 'org.gradle.api.internal.tasks.DefaultTaskInputs@6b470c32' with class 'org.gradle.api.internal.tasks.DefaultTaskInputs' to class 'org.gradle.api.tasks.incremental.IncrementalTaskInputs'
I hoped this would work:
compileJava {
options.incremental = true
doFirst {
inputs.outOfDate { changedFile ->
println changedFile
}
}
}