build(Needs bump): Bump dependencies (#2946)

Co-authored-by: Ushie <ushiekane@gmail.com>
Co-authored-by: aAbed <aabedhkhan@gmail.com>
Co-authored-by: CnC-Robert <CnC.Rob3rt@gmail.com>
This commit is contained in:
oSumAtrIX
2023-09-20 05:33:02 +02:00
parent 487e7f2fa6
commit aeb5299ca5
445 changed files with 4668 additions and 5477 deletions

View File

@ -1,9 +0,0 @@
package app.revanced.patches.shared.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object SeekbarFingerprint : MethodFingerprint(
"V",
strings = listOf("timed_markers_width")
)

View File

@ -1,20 +1,18 @@
package app.revanced.patches.shared.integrations.patch
package app.revanced.patches.shared.integrations
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchException
import app.revanced.patches.shared.integrations.patch.AbstractIntegrationsPatch.IntegrationsFingerprint.RegisterResolver
import app.revanced.patches.shared.integrations.AbstractIntegrationsPatch.IntegrationsFingerprint.RegisterResolver
import com.android.tools.smali.dexlib2.Opcode
import com.android.tools.smali.dexlib2.iface.ClassDef
import com.android.tools.smali.dexlib2.iface.Method
@Description("Applies mandatory patches to implement the ReVanced integrations into the application.")
abstract class AbstractIntegrationsPatch(
private val integrationsDescriptor: String,
private val hooks: Iterable<IntegrationsFingerprint>
private val hooks: Set<IntegrationsFingerprint>
) : BytecodePatch(hooks) {
/**
* [MethodFingerprint] for integrations.

View File

@ -1,4 +1,4 @@
package app.revanced.patches.shared.mapping.misc.patch
package app.revanced.patches.shared.mapping.misc
import app.revanced.patcher.data.ResourceContext
import app.revanced.patcher.patch.ResourcePatch
@ -8,14 +8,12 @@ import java.util.concurrent.Executors
import java.util.concurrent.TimeUnit
class ResourceMappingPatch : ResourcePatch {
companion object {
internal lateinit var resourceMappings: List<ResourceElement>
private set
object ResourceMappingPatch : ResourcePatch() {
internal lateinit var resourceMappings: List<ResourceElement>
private set
private val THREAD_COUNT = Runtime.getRuntime().availableProcessors()
private val threadPoolExecutor = Executors.newFixedThreadPool(THREAD_COUNT)
}
private val THREAD_COUNT = Runtime.getRuntime().availableProcessors()
private val threadPoolExecutor = Executors.newFixedThreadPool(THREAD_COUNT)
override fun execute(context: ResourceContext) {
// save the file in memory to concurrently read from
@ -34,7 +32,7 @@ class ResourceMappingPatch : ResourcePatch {
val batchStart = jobSize * threadIndex
val batchEnd = jobSize * (threadIndex + 1)
element@ for (i in batchStart until batchEnd) {
// make sure to not to go out of bounds when rounding errors occur at calculating the jobSize
// make sure to not go out of bounds when rounding errors occur at calculating the jobSize
if (i >= resourcesLength) return@thread
val node = resources.item(i)
@ -46,6 +44,7 @@ class ResourceMappingPatch : ResourcePatch {
if (node.nodeName != "public" || nameAttribute.startsWith("APKTOOL")) continue
val id = node.getAttribute("id").substring(2).toLong(16)
mappings.add(ResourceElement(typeAttribute, nameAttribute, id))
}
}
@ -58,6 +57,6 @@ class ResourceMappingPatch : ResourcePatch {
resourceMappings = mappings
}
}
data class ResourceElement(val type: String, val name: String, val id: Long)
data class ResourceElement(val type: String, val name: String, val id: Long)
}

View File

@ -1,19 +1,17 @@
package app.revanced.patches.shared.misc.fix.verticalscroll.patch
package app.revanced.patches.shared.misc.fix.verticalscroll
import app.revanced.extensions.exception
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patches.shared.misc.fix.verticalscroll.annotations.VerticalScrollCompatibility
import app.revanced.patcher.patch.annotation.Patch
import app.revanced.patches.shared.misc.fix.verticalscroll.fingerprints.CanScrollVerticallyFingerprint
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
@Description("Fixes issues with refreshing the feed when the first component is of type EmptyComponent.")
@VerticalScrollCompatibility
class VerticalScrollPatch : BytecodePatch(
listOf(CanScrollVerticallyFingerprint)
@Patch(description = "Fixes issues with refreshing the feed when the first component is of type EmptyComponent.")
object VerticalScrollPatch : BytecodePatch(
setOf(CanScrollVerticallyFingerprint)
) {
override fun execute(context: BytecodeContext) {
CanScrollVerticallyFingerprint.result?.let {

View File

@ -1,13 +0,0 @@
package app.revanced.patches.shared.misc.fix.verticalscroll.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility(
[
Package("com.google.android.youtube"),
Package("com.vanced.android.youtube")
]
)
@Target(AnnotationTarget.CLASS)
internal annotation class VerticalScrollCompatibility

View File

@ -1,4 +1,4 @@
package app.revanced.patches.shared.settings.resource.patch
package app.revanced.patches.shared.settings
import app.revanced.patcher.data.ResourceContext
import app.revanced.patcher.patch.ResourcePatch
@ -23,7 +23,7 @@ import java.io.Closeable
abstract class AbstractSettingsResourcePatch(
private val preferenceFileName: String,
private val sourceDirectory: String,
) : ResourcePatch, Closeable {
) : ResourcePatch(), Closeable {
override fun execute(context: ResourceContext) {
/*
* used for self-restart

View File

@ -4,7 +4,7 @@ import app.revanced.patches.shared.settings.preference.BaseResource
import app.revanced.patches.shared.settings.preference.DefaultBasePreference
import app.revanced.patches.shared.settings.preference.SummaryType
import app.revanced.patches.shared.settings.preference.addSummary
import app.revanced.patches.shared.settings.resource.patch.AbstractSettingsResourcePatch.Companion.include
import app.revanced.patches.shared.settings.AbstractSettingsResourcePatch.Companion.include
import org.w3c.dom.Document
import org.w3c.dom.Element