Bump d8 used in box tests to 2.1.75
This commit is contained in:
committed by
TeamCityServer
parent
737fbe271f
commit
0cca07fa19
@@ -27,22 +27,21 @@ public class D8Checker {
|
||||
|
||||
public static void check(ClassFileFactory outputFiles) {
|
||||
if (!RUN_D8_CHECKER) return;
|
||||
runD8(builder -> addOutputFiles(builder, outputFiles));
|
||||
}
|
||||
|
||||
runD8(builder -> {
|
||||
for (OutputFile file : ClassFileUtilsKt.getClassFiles(outputFiles)) {
|
||||
byte[] bytes = file.asByteArray();
|
||||
builder.addClassProgramData(bytes, new PathOrigin(Paths.get(file.getRelativePath())));
|
||||
}
|
||||
});
|
||||
private static void addOutputFiles(D8Command.Builder builder, ClassFileFactory outputFiles) {
|
||||
for (OutputFile file : ClassFileUtilsKt.getClassFiles(outputFiles)) {
|
||||
byte[] bytes = file.asByteArray();
|
||||
builder.addClassProgramData(bytes, new PathOrigin(Paths.get(file.getRelativePath())));
|
||||
}
|
||||
}
|
||||
|
||||
public static void checkFilesWithD8(Collection<Pair<byte[], String>> classFiles) {
|
||||
if (!RUN_D8_CHECKER) return;
|
||||
runD8(builder -> {
|
||||
classFiles.forEach(pair -> {
|
||||
builder.addClassProgramData(pair.getFirst(), new PathOrigin(Paths.get(pair.getSecond())));
|
||||
});
|
||||
});
|
||||
runD8(builder -> classFiles.forEach(
|
||||
pair -> builder.addClassProgramData(pair.getFirst(), new PathOrigin(Paths.get(pair.getSecond())))
|
||||
));
|
||||
}
|
||||
|
||||
// Compilation with D8 should proceed with no output. There should be no info, warnings, or errors.
|
||||
@@ -82,8 +81,7 @@ public class D8Checker {
|
||||
StringWriter writer = new StringWriter();
|
||||
try (PrintWriter printWriter = new PrintWriter(writer)) {
|
||||
e.printStackTrace(printWriter);
|
||||
String stackTrace = writer.toString();
|
||||
return stackTrace;
|
||||
return writer.toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user