dev.gradleplugins.runnerkit.providers.StandardStreamProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gradle-runner-kit-impl Show documentation
Show all versions of gradle-runner-kit-impl Show documentation
Gradle runner kit implementation.
package dev.gradleplugins.runnerkit.providers;
import org.apache.commons.io.output.WriterOutputStream;
import java.io.OutputStream;
import java.io.Writer;
import java.nio.charset.Charset;
public final class StandardStreamProvider extends AbstractGradleExecutionProvider {
public static StandardStreamProvider forwardToStandardOutput() {
return fixed(StandardStreamProvider.class, System.out);
}
public static StandardStreamProvider forwardToStandardError() {
return fixed(StandardStreamProvider.class, System.err);
}
public static StandardStreamProvider of(Writer writer) {
return fixed(StandardStreamProvider.class, new WriterOutputStream(writer, Charset.defaultCharset()));
}
}