Slackbot
06/27/2023, 2:37 PMMiles Peele
06/27/2023, 2:38 PMonlyIf blockMikhail Lopatkin
06/27/2023, 2:45 PMMiles Peele
06/27/2023, 2:47 PMProject object which isn't configuration-cache safe AFAIKAdam
06/27/2023, 2:52 PMMiles Peele
06/27/2023, 3:09 PMFile s, yup!Adam
06/28/2023, 7:24 AMAdam
06/28/2023, 7:27 AMonlyIf {} block you want to just change the other tasks to only process files that contain the property.
val downloaderTask by tasks.registering { ... }
val processorTask by tasks.registering { ... }
val otherTask by tasks.registering {
val processedFilesWithProperty = processorTask.map {
it.outputDirectory.asFileTree.files.filter { file ->
"xyzProperty" in file.readText()
}
}
inputs.files(processedFilesWithProperty)
doLast {
val files = processedFilesWithProperty.get()
// ...
}
}Miles Peele
06/28/2023, 1:52 PM