Search in sources :

Example 6 with ConsoleMetaData

use of org.gradle.internal.nativeintegration.console.ConsoleMetaData in project gradle by gradle.

the class OutputEventRenderer method attachConsole.

@Override
public void attachConsole(OutputStream outputStream, ConsoleOutput consoleOutput) {
    synchronized (lock) {
        if (consoleOutput == ConsoleOutput.Plain) {
            addPlainConsole(new StreamBackedStandardOutputListener(outputStream));
        } else {
            ConsoleMetaData consoleMetaData = FallbackConsoleMetaData.INSTANCE;
            OutputStreamWriter writer = new OutputStreamWriter(outputStream);
            Console console = new AnsiConsole(writer, writer, getColourMap(), consoleMetaData, true);
            addRichConsole(console, true, true, consoleMetaData, consoleOutput == ConsoleOutput.Verbose);
        }
    }
}
Also used : Console(org.gradle.internal.logging.console.Console) AnsiConsole(org.gradle.internal.logging.console.AnsiConsole) FallbackConsoleMetaData(org.gradle.internal.nativeintegration.console.FallbackConsoleMetaData) ConsoleMetaData(org.gradle.internal.nativeintegration.console.ConsoleMetaData) OutputStreamWriter(java.io.OutputStreamWriter) AnsiConsole(org.gradle.internal.logging.console.AnsiConsole) StreamBackedStandardOutputListener(org.gradle.internal.logging.text.StreamBackedStandardOutputListener)

Aggregations

ConsoleMetaData (org.gradle.internal.nativeintegration.console.ConsoleMetaData)6 FallbackConsoleMetaData (org.gradle.internal.nativeintegration.console.FallbackConsoleMetaData)5 ConsoleDetector (org.gradle.internal.nativeintegration.console.ConsoleDetector)4 OutputStreamWriter (java.io.OutputStreamWriter)3 AnsiConsole (org.gradle.internal.logging.console.AnsiConsole)3 Console (org.gradle.internal.logging.console.Console)3 OutputStream (java.io.OutputStream)1 StreamBackedStandardOutputListener (org.gradle.internal.logging.text.StreamBackedStandardOutputListener)1