Hi,
I have been deep-diving into Bnd’s Gradle tasks recently as I try to execute them from IntelliJ, and I have noticed this code in the FileSetRepositoryConvention
:
// need to programmatically add to inputs since @InputFiles in a convention is not processed
task.inputs.files(bundleCollection).withPropertyName('bundles')
I understand what these lines are doing, but Gradle usually asks that file properties be “normalized” somehow too. More specifically, it moans that
property ‘blah’ is declared without normalization specified. Properties of cacheable work must declare their normalization via @PathSensitive, @Classpath or @CompileClasspath. Defaulting to PathSensitivity.ABSOLUTE.
And so I was wondering - could this programmatic property also need normalization, if only for the sake of the task’s up-to-date checks? Perhaps:
task.inputs.files(bundleCollection)
.withNormalizer(ClasspathNormalizer)
.withPropertyName('bundles')
I’m just wondering here - I routinely apply a normalization to my “file” task properties, regardless of whether or not I have declared its task as a @CacheableTask
, on the basis that a “stricter” execution of Gradle’s ValidatePlugins
task is presumably trying to tell me something worth knowing (?)
Cheers,
Chris