JVM: Add D8 check that class files can be dexed with D8.
This change adds D8 in addition to Dx which is being deprecated. At some point after the official Dx deprecation, we should remove the Dx checker. Moving to D8 has the additional benefit that D8 can dex code using java 8 features without using a separate desugaring tool.
This commit is contained in:
committed by
Alexander Udalov
parent
222ceb7698
commit
73aa36ca59
@@ -34,12 +34,16 @@ class TestStdlibWithDxTest {
|
||||
}
|
||||
|
||||
private fun doTest(file: File) {
|
||||
val files = mutableListOf<Pair<ByteArray, String>>();
|
||||
ZipInputStream(FileInputStream(file)).use { zip ->
|
||||
for (entry in generateSequence { zip.nextEntry }) {
|
||||
if (entry.name.endsWith(".class") && !entry.name.startsWith("META-INF/")) {
|
||||
DxChecker.checkFileWithDx(zip.readBytes(), entry.name)
|
||||
val bytes = zip.readBytes()
|
||||
DxChecker.checkFileWithDx(bytes, entry.name)
|
||||
files.add(Pair(bytes, entry.name))
|
||||
}
|
||||
}
|
||||
}
|
||||
D8Checker.checkFilesWithD8(files)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user