feat(twitch): ˋintegrationsˋ dependency patch (#1074)

This commit is contained in:
Tim Schneeberger 2022-11-23 07:30:11 +01:00 committed by GitHub
parent c4b19f0955
commit a84ca7ec04
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 38 additions and 0 deletions

View file

@ -0,0 +1,9 @@
package app.revanced.patches.twitch.misc.integrations.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("tv.twitch.android.app")])
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
internal annotation class IntegrationsCompatibility

View file

@ -0,0 +1,16 @@
package app.revanced.patches.twitch.misc.integrations.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patches.twitch.misc.integrations.annotations.IntegrationsCompatibility
import app.revanced.shared.patches.AbstractIntegrationsPatch.IntegrationsFingerprint
@Name("init-fingerprint")
@IntegrationsCompatibility
@Version("0.0.1")
object InitFingerprint : IntegrationsFingerprint(
customFingerprint = { methodDef ->
methodDef.definingClass.endsWith("/TwitchApplication;") &&
methodDef.name == "onCreate"
}
)

View file

@ -0,0 +1,13 @@
package app.revanced.patches.twitch.misc.integrations.patch
import app.revanced.patcher.annotation.Name
import app.revanced.patches.twitch.misc.integrations.fingerprints.InitFingerprint
import app.revanced.patches.twitch.misc.integrations.annotations.IntegrationsCompatibility
import app.revanced.shared.patches.AbstractIntegrationsPatch
@Name("integrations")
@IntegrationsCompatibility
class IntegrationsPatch : AbstractIntegrationsPatch(
"Lapp/revanced/twitch/utils/ReVancedUtils;",
listOf(InitFingerprint)
)