Kelvin Chung
03/20/2024, 6:08 PMval taskA = tasks.named("A")
tasks.register("B") {
onlyIf { taskA.get().onlyIf.isSatisfiedBy(this) }
}
I think the intent is that B has the same onlyIf conditions as A, whatever they they may be, but the issue is that onlyIf appears to be internal API even though the compiler doesn't flag it. Any advice on a redesign?Adam
03/20/2024, 6:41 PMval sharedOnlyIf = Spec { ... }
taskA.configure {
onlyIf(sharedOnlyIf)
}
taskB.configure {
onlyIf(sharedOnlyIf)
}Kelvin Chung
03/20/2024, 6:41 PMAdam
03/20/2024, 6:48 PMAdam
03/20/2024, 6:48 PMKelvin Chung
03/20/2024, 7:31 PMOctavia Togami
03/20/2024, 8:46 PMonlyIf { taskA.get().didWork }. I think the timing of the onlyIf evaluation is late enough for that.