Issue is upstream in ktlint-gradle and should be fixed there.
While we're at it, the report files of the tasks should be registered as outputs in order to make the task cacheable upstream. Currently our ktlint-convention does it.
The following lets Gradle consider files including their absolute path:
Path sensitivity should instead be set to relative in order to make the cached task relocatable, see https://guides.gradle.org/using-build-cache/#relocatability
Can you provide a few more details about what this means?
@JLLeitschuh details added to the issue description
I opened a PR changing the path sensitivity for the check task: https://github.com/JLLeitschuh/ktlint-gradle/pull/84
Most helpful comment
I opened a PR changing the path sensitivity for the check task: https://github.com/JLLeitschuh/ktlint-gradle/pull/84