I got logs like :
"is not incremental (e.g. outputs have changed, no previous execution, etc.).“
or
"is not incremental. Unable to infer the source directories.”
I just do this:
tasks.withType(JavaCompile) { task ->
task.options.useDepend = true
task.options.incremental = true
}
plus. DataBinding is also being used in my Android project.
Looks like your task does not declare the inputs and outputs - in that case, Gradle has no way of checking the timestamps and hashes, so it assumes it needs to rebuild.