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
This commit is contained in:
Andy Wilkinson 2019-09-25 15:44:01 +01:00 committed by Sam Brannen
parent 69a0730b01
commit 00bad3dce0
1 changed files with 1 additions and 1 deletions

View File

@ -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() {