mirror of
https://github.com/ReVanced/revanced-patcher.git
synced 2024-11-13 02:14:27 +01:00
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:
parent
db10ab03be
commit
a6c6b4979a
2 changed files with 9 additions and 5 deletions
|
@ -12,6 +12,10 @@ repositories {
|
||||||
maven {
|
maven {
|
||||||
url = uri("https://maven.pkg.github.com/ReVancedTeam/multidexlib2")
|
url = uri("https://maven.pkg.github.com/ReVancedTeam/multidexlib2")
|
||||||
credentials {
|
credentials {
|
||||||
|
// DO NOT set these variables in the project's gradle.properties.
|
||||||
|
// Instead, you should set them in:
|
||||||
|
// Windows: %homepath%\.gradle\gradle.properties
|
||||||
|
// Linux: ~/.gradle/gradle.properties
|
||||||
username = project.findProperty("gpr.user") as String? ?: System.getenv("GITHUB_ACTOR") // DO NOT CHANGE!
|
username = project.findProperty("gpr.user") as String? ?: System.getenv("GITHUB_ACTOR") // DO NOT CHANGE!
|
||||||
password = project.findProperty("gpr.key") as String? ?: System.getenv("GITHUB_TOKEN") // DO NOT CHANGE!
|
password = project.findProperty("gpr.key") as String? ?: System.getenv("GITHUB_TOKEN") // DO NOT CHANGE!
|
||||||
}
|
}
|
||||||
|
@ -21,7 +25,7 @@ repositories {
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(kotlin("stdlib"))
|
implementation(kotlin("stdlib"))
|
||||||
|
|
||||||
implementation("app.revanced:multidexlib2:2.5.2")
|
implementation("app.revanced:multidexlib2:2.5.2.r2")
|
||||||
@Suppress("GradlePackageUpdate")
|
@Suppress("GradlePackageUpdate")
|
||||||
implementation("org.smali:smali:2.5.2")
|
implementation("org.smali:smali:2.5.2")
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,7 @@ class Patcher(
|
||||||
/**
|
/**
|
||||||
* Save the patched dex file.
|
* Save the patched dex file.
|
||||||
*/
|
*/
|
||||||
fun save(): List<MemoryDataStore> {
|
fun save(): Map<String, MemoryDataStore> {
|
||||||
val newDexFile = object : DexFile {
|
val newDexFile = object : DexFile {
|
||||||
override fun getClasses(): Set<ClassDef> {
|
override fun getClasses(): Set<ClassDef> {
|
||||||
// this is a slow workaround for now
|
// this is a slow workaround for now
|
||||||
|
@ -76,14 +76,14 @@ class Patcher(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val list = mutableListOf<MemoryDataStore>()
|
val output = mutableMapOf<String, MemoryDataStore>()
|
||||||
MultiDexIO.writeDexFile(
|
MultiDexIO.writeDexFile(
|
||||||
true, -1, // core count
|
true, -1, // core count
|
||||||
list, NAMER, newDexFile,
|
output, NAMER, newDexFile,
|
||||||
DexIO.DEFAULT_MAX_DEX_POOL_SIZE,
|
DexIO.DEFAULT_MAX_DEX_POOL_SIZE,
|
||||||
null
|
null
|
||||||
)
|
)
|
||||||
return list
|
return output
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue