mirror of
https://github.com/ReVanced/revanced-patcher.git
synced 2026-01-20 01:43:56 +00:00
fix: Patch should have access to the Cache
BREAKING CHANGE: Method signature of execute() was changed to include the cache, this will break existing implementations of the Patch class.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package net.revanced.patcher
|
||||
|
||||
import net.revanced.patcher.cache.Cache
|
||||
import net.revanced.patcher.patch.Patch
|
||||
import net.revanced.patcher.patch.PatchResult
|
||||
import net.revanced.patcher.patch.PatchResultSuccess
|
||||
@@ -48,7 +49,7 @@ internal class PatcherTest {
|
||||
|
||||
patcher.addPatches(
|
||||
object : Patch("TestPatch") {
|
||||
override fun execute(): PatchResult {
|
||||
override fun execute(cache: Cache): PatchResult {
|
||||
// Get the method from the resolver cache
|
||||
val mainMethod = patcher.cache.methods["mainMethod"]
|
||||
// Get the instruction list
|
||||
|
||||
Reference in New Issue
Block a user