From 00bad3dce053bfff85dafc1575014e4a6c73b72b Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Wed, 25 Sep 2019 15:44:01 +0100 Subject: [PATCH] Allow genJaxb's output to be cached when checkout locations differ Previously, the genJaxb task's input files were compared using absolute paths. This would result in a cache miss for two builds with identical files contents and different root directories. This commit updates the path sensitivity of the input to be relative to the build's root directory, thereby allowing caching to work irrespective of the source checkout location. Closes gh-23704 --- spring-oxm/spring-oxm.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-oxm/spring-oxm.gradle b/spring-oxm/spring-oxm.gradle index babf2658fe..3b31d45b5d 100644 --- a/spring-oxm/spring-oxm.gradle +++ b/spring-oxm/spring-oxm.gradle @@ -22,7 +22,7 @@ task genJaxb { ext.sourcesDir = "${genSourcesDir}/jaxb" ext.classesDir = "${buildDir}/classes/jaxb" - inputs.files flightSchema + inputs.files(flightSchema).withPathSensitivity(PathSensitivity.RELATIVE) outputs.dir classesDir doLast() {