From c6ab87ca01a45526b0424e7df4b6899d43c12c9c Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Wed, 14 Dec 2022 00:25:03 +0100 Subject: [PATCH] chore: bump patcher dependency version --- build.gradle.kts | 2 +- .../kotlin/app/revanced/extensions/Extensions.kt | 14 -------------- .../patch/bytecode/SwipeControlsBytecodePatch.kt | 4 ++-- 3 files changed, 3 insertions(+), 17 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 03e030f7..0aad8b0f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -20,7 +20,7 @@ repositories { } dependencies { - implementation("app.revanced:revanced-patcher:6.3.0") + implementation("app.revanced:revanced-patcher:6.3.1") implementation("app.revanced:multidexlib2:2.5.2.r2") // Required for meta implementation("com.google.code.gson:gson:2.10") diff --git a/src/main/kotlin/app/revanced/extensions/Extensions.kt b/src/main/kotlin/app/revanced/extensions/Extensions.kt index 58181c65..7c70f90c 100644 --- a/src/main/kotlin/app/revanced/extensions/Extensions.kt +++ b/src/main/kotlin/app/revanced/extensions/Extensions.kt @@ -1,6 +1,5 @@ package app.revanced.extensions -import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.MethodFingerprintExtensions.name import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint import app.revanced.patcher.patch.PatchResultError @@ -28,19 +27,6 @@ fun MutableClass.findMutableMethodOf(method: Method) = this.methods.first { MethodUtil.methodSignaturesMatch(it, method) } -/** - * traverse the class hierarchy starting from the given root class - * - * @param targetClass the class to start traversing the class hierarchy from - * @param callback function that is called for every class in the hierarchy - */ -fun BytecodeContext.traverseClassHierarchy(targetClass: MutableClass, callback: MutableClass.() -> Unit) { - callback(targetClass) - this.findClass(targetClass.superclass ?: return)?.mutableClass?.let { - traverseClassHierarchy(it, callback) - } -} - /** * apply a transform to all methods of the class * diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/patch/bytecode/SwipeControlsBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/patch/bytecode/SwipeControlsBytecodePatch.kt index ba044d49..22f94b83 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/patch/bytecode/SwipeControlsBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/patch/bytecode/SwipeControlsBytecodePatch.kt @@ -1,7 +1,6 @@ package app.revanced.patches.youtube.interaction.swipecontrols.patch.bytecode import app.revanced.extensions.transformMethods -import app.revanced.extensions.traverseClassHierarchy import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Version @@ -11,10 +10,11 @@ import app.revanced.patcher.patch.PatchResult import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch +import app.revanced.patcher.util.TypeUtil.traverseClassHierarchy import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod.Companion.toMutable +import app.revanced.patches.shared.fingerprints.WatchWhileActivityFingerprint import app.revanced.patches.youtube.interaction.swipecontrols.annotation.SwipeControlsCompatibility import app.revanced.patches.youtube.interaction.swipecontrols.fingerprints.SwipeControlsHostActivityFingerprint -import app.revanced.patches.shared.fingerprints.WatchWhileActivityFingerprint import app.revanced.patches.youtube.interaction.swipecontrols.patch.resource.SwipeControlsResourcePatch import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch import app.revanced.patches.youtube.misc.playertype.patch.PlayerTypeHookPatch