refactor: bump multidexlib2 to 2.5.2.r2

BREAKING CHANGE: Method signature of Patcher#save() was changed to comply with the changes of multidexlib2.
This commit is contained in:
Lucaskyy
2022-04-09 20:33:22 +02:00
parent e45fc02aae
commit 32e645850d
2 changed files with 9 additions and 5 deletions

View File

@@ -56,7 +56,7 @@ class Patcher(
/**
* Save the patched dex file.
*/
fun save(): List<MemoryDataStore> {
fun save(): Map<String, MemoryDataStore> {
val newDexFile = object : DexFile {
override fun getClasses(): Set<ClassDef> {
// this is a slow workaround for now
@@ -76,14 +76,14 @@ class Patcher(
}
}
val list = mutableListOf<MemoryDataStore>()
val output = mutableMapOf<String, MemoryDataStore>()
MultiDexIO.writeDexFile(
true, -1, // core count
list, NAMER, newDexFile,
output, NAMER, newDexFile,
DexIO.DEFAULT_MAX_DEX_POOL_SIZE,
null
)
return list
return output
}
/**