diff --git a/src/tools/android/java/com/google/devtools/build/android/r8/CompatDexBuilder.java b/src/tools/android/java/com/google/devtools/build/android/r8/CompatDexBuilder.java index 10be42b0f1f585..dfa08a802d511b 100644 --- a/src/tools/android/java/com/google/devtools/build/android/r8/CompatDexBuilder.java +++ b/src/tools/android/java/com/google/devtools/build/android/r8/CompatDexBuilder.java @@ -163,7 +163,7 @@ private void run(String[] args) throws IOException, InterruptedException, Execut List> futures = new ArrayList<>(toDex.size()); for (ZipEntry classEntry : toDex) { - futures.add(executor.submit(() -> dexEntry(zipFile, classEntry, executor))); + futures.add(executor.submit(() -> dexEntry(input, zipFile, classEntry, executor))); } for (int i = 0; i < futures.size(); i++) { ZipEntry entry = toDex.get(i); @@ -176,11 +176,13 @@ private void run(String[] args) throws IOException, InterruptedException, Execut } } - private DexConsumer dexEntry(ZipFile zipFile, ZipEntry classEntry, ExecutorService executor) + private DexConsumer dexEntry( + String classpath, ZipFile zipFile, ZipEntry classEntry, ExecutorService executor) throws IOException, CompilationFailedException { DexConsumer consumer = new DexConsumer(); D8Command.Builder builder = D8Command.builder(); builder + .addClasspathFiles(Paths.get(classpath)) .setProgramConsumer(consumer) .setMode(noLocals ? CompilationMode.RELEASE : CompilationMode.DEBUG) .setMinApiLevel(13) // H_MR2.