From ed56bf49ad300916698435ce530b967aaf37ec31 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Fri, 9 Jan 2026 16:02:46 +0100 Subject: [PATCH] make typealiases public --- .../kotlin/app/revanced/patcher/Matching.kt | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/patcher/src/commonMain/kotlin/app/revanced/patcher/Matching.kt b/patcher/src/commonMain/kotlin/app/revanced/patcher/Matching.kt index e419f2a..7c8830e 100644 --- a/patcher/src/commonMain/kotlin/app/revanced/patcher/Matching.kt +++ b/patcher/src/commonMain/kotlin/app/revanced/patcher/Matching.kt @@ -68,8 +68,8 @@ fun MethodImplementation.anyDebugItem(predicate: Predicate) = debugItems.an fun Iterable.anyInstruction(predicate: Predicate) = any(predicate) -private typealias ClassDefPredicate = context(PredicateContext) ClassDef.() -> Boolean -private typealias MethodPredicate = context(PredicateContext) Method.() -> Boolean +typealias ClassDefPredicate = context(PredicateContext) ClassDef.() -> Boolean +typealias MethodPredicate = context(PredicateContext) Method.() -> Boolean inline fun PredicateContext.remember(key: Any, defaultValue: () -> V) = if (key in this) get(key) as V else defaultValue().also { put(key, it) } @@ -85,7 +85,7 @@ private fun cachedReadOnlyProperty(block: BytecodePatchContext.(KProperty<*> class MutablePredicateList internal constructor() : MutableList> by mutableListOf() -private typealias DeclarativePredicate = context(PredicateContext) MutablePredicateList.() -> Unit +typealias DeclarativePredicate = context(PredicateContext) MutablePredicateList.() -> Unit fun T.declarativePredicate(build: Function>) = context(MutablePredicateList().apply(build)) { @@ -345,11 +345,11 @@ object BytecodePatchContextMethodMatching { fun BytecodePatchContext.firstMutableMethodOrNull( methodReference: MethodReference ): MutableMethod? = firstMutableClassDefOrNull(methodReference.definingClass)?.methods?.first { - MethodUtil.methodSignaturesMatch( - methodReference, - it - ) - } + MethodUtil.methodSignaturesMatch( + methodReference, + it + ) + } fun BytecodePatchContext.firstMutableMethod( method: MethodReference @@ -878,7 +878,7 @@ operator fun String.invoke(compare: String.(String) -> Boolean = String::equals) operator fun Opcode.invoke(): IndexedMatcherPredicate = { _, _, _ -> opcode == this@invoke } -private typealias BuildDeclarativePredicate = context(PredicateContext, IndexedMatcher, MutableList) MutablePredicateList.() -> Unit +typealias BuildDeclarativePredicate = context(PredicateContext, IndexedMatcher, MutableList) MutablePredicateList.() -> Unit fun firstMethodComposite( vararg strings: String, build: BuildDeclarativePredicate