Search in sources :

Example 6 with ProcessOutput

use of com.android.ide.common.process.ProcessOutput 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

ProcessOutput (com.android.ide.common.process.ProcessOutput)6 ProcessException (com.android.ide.common.process.ProcessException)4 ForkJoinTask (java.util.concurrent.ForkJoinTask)3 DexArchiveBuilderTransform (com.android.build.gradle.internal.transforms.DexArchiveBuilderTransform)2 FileCache (com.android.builder.utils.FileCache)2 ParsingProcessOutputHandler (com.android.ide.common.blame.ParsingProcessOutputHandler)2 DexParser (com.android.ide.common.blame.parser.DexParser)2 ToolOutputParser (com.android.ide.common.blame.parser.ToolOutputParser)2 ProcessOutputHandler (com.android.ide.common.process.ProcessOutputHandler)2 AndroidLocation (com.android.prefs.AndroidLocation)2 File (java.io.File)2 JarFile (java.util.jar.JarFile)2 TransformOutputProvider (com.android.build.api.transform.TransformOutputProvider)1 DxConsole (com.taobao.android.dx.command.DxConsole)1 Main (com.taobao.android.dx.command.dexer.Main)1 IOException (java.io.IOException)1 ArrayList (java.util.ArrayList)1