Hi. I’m converting a plugin generating Wiremock stubs from µservice contracts written in Groovy DSL. I marked input directory as
@InputDirectory and output as
@OutputDirectory. In the task an another class is called which do the convertion/generation. A task is marked as
@CacheableTask. When I call this task twice I see it is “up-to-date”. However, when I use build cache on a CI server the task is executed with the following message:
Caching disabled for task ':xxx:generateAccurest': Gradle does not know how file 'build/production/xxx-stubs/mappings/xxx/paymentResource/shouldReturn406ForBadContentType.json' was created (output property 'configProperties.stubsOutputDir'). Task output caching requires exclusive access to output paths to guarantee correctness.
What can be a reason? Why Gradle doesn’t “see” that given files were craated during a task execution?