Martin
06/11/2024, 12:11 PMtasks.register("aggregate", AggregateTask::class.java) {
// runs task dependencies
input.from(configuration)
// **doesn't run** task dependencies
input.from(configuration.files)
// runs task dependencies
input.from(configuration.incoming.artifactView { lenient(true) }.files)
}Martin
06/11/2024, 12:13 PMConfiguration internally contains some “build-by” information that allows building the task graph
• Set<File> doesn’t so it’s impossible to know what task to runMartin
06/11/2024, 12:13 PMFileCollection (the last line up there)?Martin
06/11/2024, 12:14 PMfiles in the last line is not the same as the one in the 2nd lineMartin
06/11/2024, 12:16 PMinput.from(configuration.incoming.artifactView { lenient(true) }.files.files)Martin
06/11/2024, 12:17 PMVampire
06/11/2024, 1:38 PMVampire
06/11/2024, 1:38 PMConfiguration implements FileCollection, so the files in the last line is like the configuration in that regard.Vampire
06/11/2024, 1:39 PM.files in the second line you "degrade" the FileCollection to a Set<File> which does not carry task dependenciesVampire
06/11/2024, 1:40 PMconfiguration would not be a Configuration but a Provider<Configuration>, you could also do configuration.map { it.files } to preserve the task dependencies.