build: Bump dependencies

This commit also migrates away from deprecated to new APIs
This commit is contained in:
oSumAtrIX
2024-02-21 04:07:32 +01:00
parent ff8b58b645
commit 376dda6e81
38 changed files with 464 additions and 456 deletions
@@ -13,28 +13,29 @@ import app.revanced.patches.youtube.video.information.VideoInformationPatch
dependencies = [
CopyVideoUrlResourcePatch::class,
PlayerControlsBytecodePatch::class,
VideoInformationPatch::class
VideoInformationPatch::class,
],
compatiblePackages = [
CompatiblePackage(
"com.google.android.youtube", [
"com.google.android.youtube",
[
"18.48.39",
"18.49.37",
"19.01.34",
"19.02.39",
"19.03.35",
"19.03.36",
"19.04.37"
]
)
]
"19.04.37",
],
),
],
)
@Suppress("unused")
object CopyVideoUrlBytecodePatch : BytecodePatch() {
object CopyVideoUrlBytecodePatch : BytecodePatch(emptySet()) {
private const val INTEGRATIONS_PLAYER_PACKAGE = "Lapp/revanced/integrations/youtube/videoplayer"
private val BUTTONS_DESCRIPTORS = listOf(
"$INTEGRATIONS_PLAYER_PACKAGE/CopyVideoUrlButton;",
"$INTEGRATIONS_PLAYER_PACKAGE/CopyVideoUrlTimestampButton;"
"$INTEGRATIONS_PLAYER_PACKAGE/CopyVideoUrlTimestampButton;",
)
override fun execute(context: BytecodeContext) {
@@ -44,4 +45,4 @@ object CopyVideoUrlBytecodePatch : BytecodePatch() {
PlayerControlsBytecodePatch.injectVisibilityCheckCall("$descriptor->changeVisibility(Z)V")
}
}
}
}
@@ -13,24 +13,25 @@ import app.revanced.patches.youtube.video.information.VideoInformationPatch
dependencies = [
ExternalDownloadsResourcePatch::class,
PlayerControlsBytecodePatch::class,
VideoInformationPatch::class
VideoInformationPatch::class,
],
compatiblePackages = [
CompatiblePackage(
"com.google.android.youtube", [
"com.google.android.youtube",
[
"18.48.39",
"18.49.37",
"19.01.34",
"19.02.39",
"19.03.35",
"19.03.36",
"19.04.37"
]
"19.04.37",
],
),
]
],
)
@Suppress("unused")
object ExternalDownloadsBytecodePatch : BytecodePatch() {
object ExternalDownloadsBytecodePatch : BytecodePatch(emptySet()) {
private const val BUTTON_DESCRIPTOR = "Lapp/revanced/integrations/youtube/videoplayer/ExternalDownloadButton;"
override fun execute(context: BytecodeContext) {
@@ -39,13 +40,15 @@ object ExternalDownloadsBytecodePatch : BytecodePatch() {
*/
PlayerControlsBytecodePatch.initializeControl(
"$BUTTON_DESCRIPTOR->initializeButton(Landroid/view/View;)V")
"$BUTTON_DESCRIPTOR->initializeButton(Landroid/view/View;)V",
)
/*
add code to change the visibility of the control
*/
PlayerControlsBytecodePatch.injectVisibilityCheckCall(
"$BUTTON_DESCRIPTOR->changeVisibility(Z)V")
"$BUTTON_DESCRIPTOR->changeVisibility(Z)V",
)
}
}
}