diff --git a/src/main/kotlin/net/revanced/patcher/Patcher.kt b/src/main/kotlin/net/revanced/patcher/Patcher.kt index 36445a2..77d9b0e 100644 --- a/src/main/kotlin/net/revanced/patcher/Patcher.kt +++ b/src/main/kotlin/net/revanced/patcher/Patcher.kt @@ -1,6 +1,7 @@ package net.revanced.patcher import net.revanced.patcher.patch.Patch +import net.revanced.patcher.patch.PatchResult import net.revanced.patcher.signature.Signature import net.revanced.patcher.store.PatchStore import net.revanced.patcher.store.SignatureStore @@ -15,4 +16,10 @@ class Patcher( SignatureStore.addSignatures(*signatures) PatchStore.addPatches(*patches) } + + fun patch() { + PatchStore.patches.forEach { + + } + } } \ No newline at end of file diff --git a/src/main/kotlin/net/revanced/patcher/patch/Patch.kt b/src/main/kotlin/net/revanced/patcher/patch/Patch.kt index 1b39ed4..b1bd57a 100644 --- a/src/main/kotlin/net/revanced/patcher/patch/Patch.kt +++ b/src/main/kotlin/net/revanced/patcher/patch/Patch.kt @@ -1,3 +1,8 @@ package net.revanced.patcher.patch -class Patch(val fn: Function) \ No newline at end of file + +class Patch(val fn: () -> PatchResult) { + fun execute(): PatchResult { + return fn() + } +} diff --git a/src/main/kotlin/net/revanced/patcher/store/PatchStore.kt b/src/main/kotlin/net/revanced/patcher/store/PatchStore.kt index 6493135..aef36f2 100644 --- a/src/main/kotlin/net/revanced/patcher/store/PatchStore.kt +++ b/src/main/kotlin/net/revanced/patcher/store/PatchStore.kt @@ -3,7 +3,7 @@ package net.revanced.patcher.store import net.revanced.patcher.patch.Patch object PatchStore { - private val patches: MutableList = mutableListOf() + val patches: MutableList = mutableListOf() fun addPatches(vararg patches: Patch) { this.patches.addAll(patches)