From d21128fe2e910a3eb020884cb368ccfd453b18ea Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Fri, 26 Jul 2024 03:08:54 +0200 Subject: [PATCH] build(Needs bump): Bump dependencies --- gradle/libs.versions.toml | 8 ++++---- .../patcher/util/proxy/mutableTypes/MutableClass.kt | 9 ++++----- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index ac82d74..198669d 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,12 +1,12 @@ [versions] android = "4.1.1.4" apktool-lib = "2.9.3" -kotlin = "1.9.22" -kotlinx-coroutines-core = "1.7.3" +kotlin = "2.0.0" +kotlinx-coroutines-core = "1.8.1" mockk = "1.13.10" multidexlib2 = "3.0.3.r3" -smali = "3.0.5" -binary-compatibility-validator = "0.14.0" +smali = "3.0.7" +binary-compatibility-validator = "0.15.1" xpp3 = "1.1.4c" [libraries] diff --git a/src/main/kotlin/app/revanced/patcher/util/proxy/mutableTypes/MutableClass.kt b/src/main/kotlin/app/revanced/patcher/util/proxy/mutableTypes/MutableClass.kt index 19f5f1f..af6066c 100644 --- a/src/main/kotlin/app/revanced/patcher/util/proxy/mutableTypes/MutableClass.kt +++ b/src/main/kotlin/app/revanced/patcher/util/proxy/mutableTypes/MutableClass.kt @@ -7,7 +7,6 @@ import com.android.tools.smali.dexlib2.base.reference.BaseTypeReference import com.android.tools.smali.dexlib2.iface.ClassDef import com.android.tools.smali.dexlib2.util.FieldUtil import com.android.tools.smali.dexlib2.util.MethodUtil -import com.google.common.collect.Iterables class MutableClass(classDef: ClassDef) : ClassDef, BaseTypeReference() { // Class @@ -23,13 +22,13 @@ class MutableClass(classDef: ClassDef) : ClassDef, BaseTypeReference() { // Methods private val _methods by lazy { classDef.methods.map { method -> method.toMutable() }.toMutableSet() } - private val _directMethods by lazy { Iterables.filter(_methods, MethodUtil.METHOD_IS_DIRECT).toMutableSet() } - private val _virtualMethods by lazy { Iterables.filter(_methods, MethodUtil.METHOD_IS_VIRTUAL).toMutableSet() } + private val _directMethods by lazy { _methods.filter { method -> MethodUtil.isDirect(method) }.toMutableSet() } + private val _virtualMethods by lazy { _methods.filter { method -> !MethodUtil.isDirect(method) }.toMutableSet() } // Fields private val _fields by lazy { classDef.fields.map { field -> field.toMutable() }.toMutableSet() } - private val _staticFields by lazy { Iterables.filter(_fields, FieldUtil.FIELD_IS_STATIC).toMutableSet() } - private val _instanceFields by lazy { Iterables.filter(_fields, FieldUtil.FIELD_IS_INSTANCE).toMutableSet() } + private val _staticFields by lazy { _fields.filter { field -> FieldUtil.isStatic(field) }.toMutableSet() } + private val _instanceFields by lazy { _fields.filter { field -> !FieldUtil.isStatic(field) }.toMutableSet() } fun setType(type: String) { this.type = type