We have some functional tests in our project for which we need to start up an application and then shut it down after the tests have finished. Starting up takes some time and we would like to avoid it if the test won’t run because they are up-to-date.
Is there a way to check if some other task is up-to-date inside of an onlyIf {} condition? I found that during execution SkipUpToDateTaskExecuter is using TaskArtifactStateRepository to retrieve a TaskArtifactState to check if it’s up to date but all these classes are internal.
The long term idea here is to solve this by allowing arbitrary levels of composition. You’d create a kind of composite task that incorporates both parts, and effectively allowing you to export inputs/outputs to the outer layer.
As for whether it’s worth adding something else in the mean time, would be worth raising as an idea on the dev list.