mirror of
https://github.com/ReVanced/revanced-patcher.git
synced 2026-01-28 05:31:03 +00:00
fix: Downgrade smali to fix dex compilation issue
This commit is contained in:
@@ -154,7 +154,7 @@ class Patcher(private val config: PatcherConfig) : Closeable {
|
||||
}
|
||||
}
|
||||
|
||||
override fun close() = context.bytecodeContext.close()
|
||||
override fun close() = context.close()
|
||||
|
||||
/**
|
||||
* Compile and save patched APK files.
|
||||
|
||||
@@ -5,6 +5,7 @@ import app.revanced.patcher.patch.Patch
|
||||
import app.revanced.patcher.patch.ResourcePatchContext
|
||||
import brut.androlib.apk.ApkInfo
|
||||
import brut.directory.ExtFile
|
||||
import java.io.Closeable
|
||||
|
||||
/**
|
||||
* A context for the patcher containing the current state of the patcher.
|
||||
@@ -12,7 +13,7 @@ import brut.directory.ExtFile
|
||||
* @param config The configuration for the patcher.
|
||||
*/
|
||||
@Suppress("MemberVisibilityCanBePrivate")
|
||||
class PatcherContext internal constructor(config: PatcherConfig) {
|
||||
class PatcherContext internal constructor(config: PatcherConfig): Closeable {
|
||||
/**
|
||||
* [PackageMetadata] of the supplied [PatcherConfig.apkFile].
|
||||
*/
|
||||
@@ -37,4 +38,6 @@ class PatcherContext internal constructor(config: PatcherConfig) {
|
||||
* The context for patches containing the current state of the bytecode.
|
||||
*/
|
||||
internal val bytecodeContext = BytecodePatchContext(config)
|
||||
|
||||
override fun close() = bytecodeContext.close()
|
||||
}
|
||||
|
||||
@@ -192,6 +192,7 @@ internal object PatcherTest {
|
||||
|
||||
private operator fun Set<Patch<*>>.invoke(): List<PatchResult> {
|
||||
every { patcher.context.executablePatches } returns toMutableSet()
|
||||
every { patcher.context.bytecodeContext.lookupMaps } returns LookupMaps(patcher.context.bytecodeContext.classes)
|
||||
|
||||
return runBlocking { patcher().toList() }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user