ArtifactSinkingTool

constructor(delegate: Tool, clazz: Class<T>, sink: ArtifactSink, filter: (T) -> Boolean = { true }, transform: (T) -> Any = { it })

Parameters

T

The type of artifact to capture

delegate

The tool to wrap

clazz

The class of T for type filtering

sink

Where to send captured artifacts

filter

Optional filter to decide which artifacts to capture. Default accepts all.

transform

Optional function to transform artifacts before sending to sink. Default passes through.