mirror of
https://github.com/revanced/revanced-patcher.git
synced 2025-04-30 05:14:26 +02:00
fix: Accept PatchSet
in PatchesConsumer#acceptPatches
This deprecates accepting `List<Patch<*>>`
This commit is contained in:
parent
58bd46750b
commit
716825f232
@ -44,6 +44,7 @@ public final class app/revanced/patcher/Patcher : app/revanced/patcher/Integrati
|
|||||||
public fun <init> (Lapp/revanced/patcher/PatcherOptions;)V
|
public fun <init> (Lapp/revanced/patcher/PatcherOptions;)V
|
||||||
public fun acceptIntegrations (Ljava/util/List;)V
|
public fun acceptIntegrations (Ljava/util/List;)V
|
||||||
public fun acceptPatches (Ljava/util/List;)V
|
public fun acceptPatches (Ljava/util/List;)V
|
||||||
|
public fun acceptPatches (Ljava/util/Set;)V
|
||||||
public synthetic fun apply (Ljava/lang/Object;)Ljava/lang/Object;
|
public synthetic fun apply (Ljava/lang/Object;)Ljava/lang/Object;
|
||||||
public fun apply (Z)Lkotlinx/coroutines/flow/Flow;
|
public fun apply (Z)Lkotlinx/coroutines/flow/Flow;
|
||||||
public fun close ()V
|
public fun close ()V
|
||||||
@ -99,6 +100,11 @@ public final class app/revanced/patcher/PatcherResult$PatchedDexFile {
|
|||||||
|
|
||||||
public abstract interface class app/revanced/patcher/PatchesConsumer {
|
public abstract interface class app/revanced/patcher/PatchesConsumer {
|
||||||
public abstract fun acceptPatches (Ljava/util/List;)V
|
public abstract fun acceptPatches (Ljava/util/List;)V
|
||||||
|
public abstract fun acceptPatches (Ljava/util/Set;)V
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patcher/PatchesConsumer$DefaultImpls {
|
||||||
|
public static fun acceptPatches (Lapp/revanced/patcher/PatchesConsumer;Ljava/util/List;)V
|
||||||
}
|
}
|
||||||
|
|
||||||
public final class app/revanced/patcher/data/BytecodeContext : app/revanced/patcher/data/Context {
|
public final class app/revanced/patcher/data/BytecodeContext : app/revanced/patcher/data/Context {
|
||||||
|
@ -46,7 +46,7 @@ class Patcher(
|
|||||||
* @param patches The [Patch]es to add.
|
* @param patches The [Patch]es to add.
|
||||||
*/
|
*/
|
||||||
@Suppress("NAME_SHADOWING")
|
@Suppress("NAME_SHADOWING")
|
||||||
override fun acceptPatches(patches: List<Patch<*>>) {
|
override fun acceptPatches(patches: PatchSet) {
|
||||||
/**
|
/**
|
||||||
* Add dependencies of a [Patch] recursively to [PatcherContext.allPatches].
|
* Add dependencies of a [Patch] recursively to [PatcherContext.allPatches].
|
||||||
* If a [Patch] is already in [PatcherContext.allPatches], it will not be added again.
|
* If a [Patch] is already in [PatcherContext.allPatches], it will not be added again.
|
||||||
|
@ -4,5 +4,7 @@ import app.revanced.patcher.patch.Patch
|
|||||||
|
|
||||||
@FunctionalInterface
|
@FunctionalInterface
|
||||||
interface PatchesConsumer {
|
interface PatchesConsumer {
|
||||||
fun acceptPatches(patches: List<Patch<*>>)
|
@Deprecated("Use acceptPatches(PatchSet) instead.", ReplaceWith("acceptPatches(patches.toSet())"))
|
||||||
|
fun acceptPatches(patches: List<Patch<*>>) = acceptPatches(patches.toSet())
|
||||||
|
fun acceptPatches(patches: PatchSet)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user