Loading tools/protologtool/src/com/android/protolog/tool/ProtoLogTool.kt +46 −42 Original line number Diff line number Diff line Loading @@ -53,6 +53,7 @@ object ProtoLogTool { val executor = newThreadPool() try { command.javaSourceArgs.map { path -> executor.submitCallable { val transformer = SourceTransformer(command.protoLogImplClassNameArg, Loading @@ -67,8 +68,8 @@ object ProtoLogTool { text } } catch (ex: ParsingException) { // If we cannot parse this file, skip it (and log why). Compilation will fail // in a subsequent build step. // If we cannot parse this file, skip it (and log why). Compilation will // fail in a subsequent build step. injector.reportParseError(ex) text } Loading @@ -80,8 +81,9 @@ object ProtoLogTool { outJar.write(outSrc.toByteArray()) outJar.closeEntry() } } finally { executor.shutdown() } val cacheSplit = command.protoLogCacheClassNameArg.split(".") val cacheName = cacheSplit.last() Loading Loading @@ -153,6 +155,7 @@ ${updates.replaceIndent(" ")} val executor = newThreadPool() try { command.javaSourceArgs.map { path -> executor.submitCallable { val file = File(path) Loading @@ -162,8 +165,8 @@ ${updates.replaceIndent(" ")} val code = tryParse(text, path) builder.findLogCalls(code, path, packagePath(file, code)) } catch (ex: ParsingException) { // If we cannot parse this file, skip it (and log why). Compilation will fail // in a subsequent build step. // If we cannot parse this file, skip it (and log why). Compilation will // fail in a subsequent build step. injector.reportParseError(ex) null } Loading @@ -174,8 +177,9 @@ ${updates.replaceIndent(" ")} }.forEach { future -> builder.addLogCalls(future.get() ?: return@forEach) } } finally { executor.shutdown() } val out = injector.fileOutputStream(command.viewerConfigJsonArg) out.write(builder.build().toByteArray()) Loading Loading
tools/protologtool/src/com/android/protolog/tool/ProtoLogTool.kt +46 −42 Original line number Diff line number Diff line Loading @@ -53,6 +53,7 @@ object ProtoLogTool { val executor = newThreadPool() try { command.javaSourceArgs.map { path -> executor.submitCallable { val transformer = SourceTransformer(command.protoLogImplClassNameArg, Loading @@ -67,8 +68,8 @@ object ProtoLogTool { text } } catch (ex: ParsingException) { // If we cannot parse this file, skip it (and log why). Compilation will fail // in a subsequent build step. // If we cannot parse this file, skip it (and log why). Compilation will // fail in a subsequent build step. injector.reportParseError(ex) text } Loading @@ -80,8 +81,9 @@ object ProtoLogTool { outJar.write(outSrc.toByteArray()) outJar.closeEntry() } } finally { executor.shutdown() } val cacheSplit = command.protoLogCacheClassNameArg.split(".") val cacheName = cacheSplit.last() Loading Loading @@ -153,6 +155,7 @@ ${updates.replaceIndent(" ")} val executor = newThreadPool() try { command.javaSourceArgs.map { path -> executor.submitCallable { val file = File(path) Loading @@ -162,8 +165,8 @@ ${updates.replaceIndent(" ")} val code = tryParse(text, path) builder.findLogCalls(code, path, packagePath(file, code)) } catch (ex: ParsingException) { // If we cannot parse this file, skip it (and log why). Compilation will fail // in a subsequent build step. // If we cannot parse this file, skip it (and log why). Compilation will // fail in a subsequent build step. injector.reportParseError(ex) null } Loading @@ -174,8 +177,9 @@ ${updates.replaceIndent(" ")} }.forEach { future -> builder.addLogCalls(future.get() ?: return@forEach) } } finally { executor.shutdown() } val out = injector.fileOutputStream(command.viewerConfigJsonArg) out.write(builder.build().toByteArray()) Loading