Say that I am using a Gradle plugin that defines task foo
, which is up to date under a certain condition. Unfortunately, I don't have the source, so I don't know when it is.
I would like to make it so that foo
is up to date if the original condition is true, and if a custom condition is also true.
I know I can add my custom condition like this:
foo.outputs.upToDateWhen {
return myCondition == true
}
But I want to be able to do something like this:
foo.outputs.upToDateWhen {
return super.upToDateWhen && myCondition == true
}
Is there any way to do what I am looking for? Can I add an up to date condition in such a way that I can have it preserve the original up to date condition?