Returns a provider for the summary result of the execution of the work scheduled for the current build.

The returned provider's value becomes available after the scheduled work has completed - successfully or otherwise - or after a configuration phase failure prevents execution.

IMPORTANT: trying to access the provider's value before the scheduled work has finished will result in an error.

 * A settings plugin that plays an appropriate sound at the end of a build.
class SoundFeedbackPlugin implements Plugin<Settings> {

    private final FlowScope flowScope;
    private final FlowProviders flowProviders;

    SoundFeedbackPlugin(FlowScope flowScope, FlowProviders flowProviders) {
        this.flowScope = flowScope;
        this.flowProviders = flowProviders;

    public void apply(Settings target) {
        final File soundsDir = new File(target.getSettingsDir(), "sounds");
        flowScope.always(FFPlay.class, spec ->
                flowProviders.getBuildWorkResult().map(result ->
                    new File(
                        result.getFailure().isPresent() ? "sad-trombone.mp3" : "tada.mp3"

See also