private File tempRootFor(String id) { return new File(invocation.getContext().getTemporaryDir(), id); }
@Override public void transform(TransformInvocation invocation) throws TransformException, InterruptedException, IOException { long startMs = System.currentTimeMillis(); LOGGER.lifecycle("Start capt transform for '{}', incremental: {}", invocation.getContext().getVariantName(), invocation.isIncremental()); variantManager.getVariantScope(invocation.getContext().getVariantName()) .doTransform(invocation); LOGGER.lifecycle("End capt transform, cost: {}ms", (System.currentTimeMillis() - startMs)); }
BaseVariant variant = getVariant(transformInvocation.getContext()); JavaCompile javaCompile = variant.getJavaCompile();
}; new InlineRProcessor(inputs, new ClassTransform(rSymbols), call).proceed(); ShrinkerPlugin.logger.lifecycle("{} consume {}ms", transformInvocation.getContext().getPath(), System.currentTimeMillis() - start); return; ShrinkerPlugin.logger.info("{} copy files {} ms", transformInvocation.getContext().getPath(), System.currentTimeMillis() - start);
@Override public void transform(TransformInvocation transformInvocation) throws IOException { Context context = transformInvocation.getContext(); java.util.Collection<TransformInput> inputs = transformInvocation.getInputs(); Collection<TransformInput> referencedInputs = transformInvocation.getReferencedInputs();
@Override public void transform(@NonNull TransformInvocation invocation) throws IOException, TransformException, InterruptedException { // Re-direct the output to appropriate log levels, just like the official ProGuard task. LoggingManager loggingManager = invocation.getContext().getLogging(); loggingManager.captureStandardOutput(LogLevel.INFO); loggingManager.captureStandardError(LogLevel.WARN); try { File input = verifyInputs(invocation.getReferencedInputs()); shrinkWithProguard(input); computeList(input); } catch (ParseException | ProcessException e) { throw new TransformException(e); } }
transform(transformInvocation.getContext(), transformInvocation.getInputs(), transformInvocation.getReferencedInputs(), transformInvocation.getOutputProvider(),