Search in sources :

Example 1 with DxConsole

use of com.taobao.android.dx.command.DxConsole in project atlas by alibaba.

the class Main method run.

public int run(String[] args, PrintStream out, PrintStream err) throws IOException {
    DxConsole console = new DxConsole();
    if (out != null) {
        console.out = out;
    }
    if (err != null) {
        console.err = err;
    }
    Arguments arguments = new Arguments();
    arguments.parse(args);
    return run(arguments, console);
}
Also used : DxConsole(com.taobao.android.dx.command.DxConsole)

Example 2 with DxConsole

use of com.taobao.android.dx.command.DxConsole in project atlas by alibaba.

the class DexWrapperHook method run.

public static ProcessResult run(@NonNull DexProcessBuilder processBuilder, @NonNull DexOptions dexOptions, @NonNull ProcessOutputHandler outputHandler) throws IOException, ProcessException {
    ProcessOutput output = outputHandler.createOutput();
    int res;
    try {
        // DxConsole.out = outputHandler.createOutput().getStandardOutput();
        // DxConsole.err = outputHandler.createOutput().getErrorOutput();
        DxConsole dxConsole = new DxConsole();
        Main.Arguments args = buildArguments(processBuilder, dexOptions, dxConsole);
        res = new Main().run(args);
    } finally {
        output.close();
    }
    outputHandler.handleOutput(output);
    return new DexProcessResult(res);
}
Also used : ProcessOutput(com.android.ide.common.process.ProcessOutput) DxConsole(com.taobao.android.dx.command.DxConsole) Main(com.taobao.android.dx.command.dexer.Main)

Aggregations

DxConsole (com.taobao.android.dx.command.DxConsole)2 ProcessOutput (com.android.ide.common.process.ProcessOutput)1 Main (com.taobao.android.dx.command.dexer.Main)1