Declare path sensitivity on task file inputs
MSALAnnotate an @InputFile with @PathSensitive(PathSensitivity.NONE) and an @InputDirectory with @PathSensitive(PathSensitivity.RELATIVE), and replace PathSensitivity.ABSOLUTE with those values. Absolute paths are the default when no sensitivity is declared, which puts the checkout location into the task's cache key: the same inputs then miss the build cache on another machine, or in another directory on the same one. @InputFiles is left alone because the right sensitivity for a collection depends on whether the task cares about the names within it, which the annotation does not say. See the Gradle best practice.
org. openrewrite. gradle. migrate. tasks. UseDefaultPathSensitivitymod run . --recipe= org. openrewrite. gradle. migrate. tasks. UseDefaultPathSensitivityInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.