Search in sources :

Example 1 with Aapt2OutputParser

use of com.android.ide.common.blame.parser.aapt.Aapt2OutputParser in project atlas by alibaba.

the class ProcessAwbAndroidResources method makeAapt.

private Aapt makeAapt() throws IOException {
    AndroidBuilder builder = getBuilder();
    MergingLog mergingLog = new MergingLog(getMergeBlameLogFolder());
    FileCache fileCache = appVariantContext.getScope().getGlobalScope().getBuildCache();
    ProcessOutputHandler processOutputHandler = new ParsingProcessOutputHandler(new ToolOutputParser(aaptGeneration == AaptGeneration.AAPT_V1 ? new AaptOutputParser() : new Aapt2OutputParser(), getILogger()), new MergingLogRewriter(mergingLog::find, builder.getErrorReporter()));
    return AaptGradleFactory.make(aaptGeneration, builder, processOutputHandler, fileCache, true, FileUtils.mkdirs(new File(getIncrementalFolder(), "awb-aapt-temp/" + awbBundle.getName())), aaptOptions.getCruncherProcesses());
}
Also used : MergingLogRewriter(com.android.ide.common.blame.MergingLogRewriter) ParsingProcessOutputHandler(com.android.ide.common.blame.ParsingProcessOutputHandler) LoggedProcessOutputHandler(com.android.ide.common.process.LoggedProcessOutputHandler) ProcessOutputHandler(com.android.ide.common.process.ProcessOutputHandler) ToolOutputParser(com.android.ide.common.blame.parser.ToolOutputParser) MergingLog(com.android.ide.common.blame.MergingLog) AndroidBuilder(com.android.builder.core.AndroidBuilder) Aapt2OutputParser(com.android.ide.common.blame.parser.aapt.Aapt2OutputParser) AaptOutputParser(com.android.ide.common.blame.parser.aapt.AaptOutputParser) JarFile(java.util.jar.JarFile) File(java.io.File) ParsingProcessOutputHandler(com.android.ide.common.blame.ParsingProcessOutputHandler) FileCache(com.android.builder.utils.FileCache)

Example 2 with Aapt2OutputParser

use of com.android.ide.common.blame.parser.aapt.Aapt2OutputParser in project atlas by alibaba.

the class TPatchDiffResAPBuildTask method makeAapt.

private Aapt makeAapt(AaptGeneration aaptGeneration) throws IOException {
    AndroidBuilder builder = getBuilder();
    MergingLog mergingLog = new MergingLog(mergeBlameLogFolder);
    ProcessOutputHandler processOutputHandler = new ParsingProcessOutputHandler(new ToolOutputParser(aaptGeneration == AaptGeneration.AAPT_V1 ? new AaptOutputParser() : new Aapt2OutputParser(), getILogger()), new MergingLogRewriter(mergingLog::find, builder.getErrorReporter()));
    return AaptGradleFactory.make(aaptGeneration, builder, processOutputHandler, fileCache, true, com.android.utils.FileUtils.mkdirs(new File(appVariantContext.getScope().getIncrementalDir(getName()), "aapt-temp")), aaptOptions.getCruncherProcesses());
}
Also used : MergingLogRewriter(com.android.ide.common.blame.MergingLogRewriter) ParsingProcessOutputHandler(com.android.ide.common.blame.ParsingProcessOutputHandler) ProcessOutputHandler(com.android.ide.common.process.ProcessOutputHandler) ToolOutputParser(com.android.ide.common.blame.parser.ToolOutputParser) MergingLog(com.android.ide.common.blame.MergingLog) AndroidBuilder(com.android.builder.core.AndroidBuilder) Aapt2OutputParser(com.android.ide.common.blame.parser.aapt.Aapt2OutputParser) AaptOutputParser(com.android.ide.common.blame.parser.aapt.AaptOutputParser) File(java.io.File) ParsingProcessOutputHandler(com.android.ide.common.blame.ParsingProcessOutputHandler)

Aggregations

AndroidBuilder (com.android.builder.core.AndroidBuilder)2 MergingLog (com.android.ide.common.blame.MergingLog)2 MergingLogRewriter (com.android.ide.common.blame.MergingLogRewriter)2 ParsingProcessOutputHandler (com.android.ide.common.blame.ParsingProcessOutputHandler)2 ToolOutputParser (com.android.ide.common.blame.parser.ToolOutputParser)2 Aapt2OutputParser (com.android.ide.common.blame.parser.aapt.Aapt2OutputParser)2 AaptOutputParser (com.android.ide.common.blame.parser.aapt.AaptOutputParser)2 ProcessOutputHandler (com.android.ide.common.process.ProcessOutputHandler)2 File (java.io.File)2 FileCache (com.android.builder.utils.FileCache)1 LoggedProcessOutputHandler (com.android.ide.common.process.LoggedProcessOutputHandler)1 JarFile (java.util.jar.JarFile)1