From ed24a201a9fbe08dd6694582d0ab08ced8ad026a Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Sun, 27 Aug 2023 04:26:14 +0200 Subject: [PATCH 1/2] fix: Revert previous release The previous release depends on a version of ReVanced Patcher which prevents usage of resource patches on lower Android versions. To solve this issue temporarily, until a fix is present, the previous release is reverted. --- build.gradle.kts | 22 +-- gradle/wrapper/gradle-wrapper.properties | 2 +- .../app/revanced/extensions/Extensions.kt | 58 ++----- .../kotlin/app/revanced/meta/JsonGenerator.kt | 3 + .../app/revanced/meta/PatchesFileGenerator.kt | 19 ++- .../patch/ExportAllActivitiesPatch.kt | 8 +- .../wifi/spoof/patch/SpoofWifiPatch.kt | 8 +- .../patch/PredictiveBackGesturePatch.kt | 6 +- .../patch/EnableAndroidDebuggingPatch.kt | 6 +- .../patch/OverrideCertificatePinningPatch.kt | 75 --------- .../patch/ChangePackageNamePatch.kt | 40 +++-- .../patch/RemoveCaptureRestrictionPatch.kt | 13 +- .../RemoveCaptureRestrictionResourcePatch.kt | 6 +- .../patch/RemoveScreenshotRestrictionPatch.kt | 14 +- .../pro/fingerprints/ProUnlockFingerprint.kt | 2 +- .../misc/pro/patch/ProUnlockPatch.kt | 12 +- .../candylinkvpn/patch/UnlockProPatch.kt | 10 +- .../IsUserSuperMethodFingerprint.kt | 14 -- .../UserSerializationMethodFingerprint.kt | 20 --- .../patch/UnlockDuolingoSuperPatch.kt | 64 -------- .../fingerprints/BootStateFingerprint.kt | 4 +- .../fingerprints/CreateKeyFingerprint.kt | 2 +- .../patch/BootloaderDetectionPatch.kt | 10 +- .../fingerprints/RootDetectionFingerprint.kt | 4 +- .../root/patch/RootDetectionPatch.kt | 10 +- .../patch/RemoveDeviceRestrictions.kt | 12 +- .../hexeditor/ad/patch/HexEditorAdsPatch.kt | 6 +- .../misc/pro/patch/UnlockProPatch.kt | 6 +- .../fingerprints/RootDetectionFingerprint.kt | 2 +- .../root/patch/RootDetectionPatch.kt | 6 +- .../fingerprints/SpoofSignatureFingerprint.kt | 2 +- .../signature/patch/SpoofSignaturePatch.kt | 5 +- .../inshorts/ad/patch/InshortsAdsPatch.kt | 10 +- .../fingerprints/ShowAdFingerprint.kt | 4 +- .../ads/GenericMediaAdFingerprint.kt | 2 +- .../fingerprints/ads/MediaAdFingerprint.kt | 8 +- .../ads/PaidPartnershipAdFingerprint.kt | 6 +- .../fingerprints/ads/ShoppingAdFingerprint.kt | 2 +- .../timeline/patch/HideTimelineAdsPatch.kt | 18 ++- .../ad/fingerprints/IrplusAdsFingerprint.kt | 2 +- .../patches/irplus/ad/patch/IrplusAdsPatch.kt | 6 +- .../DisableMandatoryLoginCompatibility.kt | 8 - .../fingerprint/IsLoggedInFingerprint.kt | 19 --- .../login/patch/DisableMandatoryLoginPatch.kt | 23 --- .../annotations/UnlockPremiumCompatibility.kt | 8 - .../fingerprint/HasPurchasedFingerprint.kt | 18 --- .../misc/premium/patch/UnlockPremiumPatch.kt | 23 --- .../LicenseValidationFingerprint.kt | 4 +- .../license/patch/LicenseValidationPatch.kt | 10 +- .../fingerprint/VerifySignatureFingerprint.kt | 4 +- .../patch/SignatureVerificationPatch.kt | 10 +- .../fingerprint/IsFreeVersionFingerprint.kt | 4 +- .../misc/pro/patch/UnlockProVersionPatch.kt | 10 +- .../fingerprints/LoadInboxAdsFingerprint.kt | 2 +- .../ads/inbox/patch/HideInboxAdsPatch.kt | 10 +- .../SendTypingIndicatorFingerprint.kt | 2 +- ...itchMessangeInputEmojiButtonFingerprint.kt | 2 +- ...tchingEmojiToStickerInMessageInputField.kt | 12 +- .../patch/DisableTypingIndicator.kt | 10 +- .../fingerprints/UnlockProFingerprint.kt | 4 +- .../moneymanager/patch/UnlockProPatch.kt | 5 +- ...ShowMusicVideoAdsConstructorFingerprint.kt | 4 +- .../ShowMusicVideoAdsFingerprint.kt | 4 +- .../ad/video/patch/MusicVideoAdsPatch.kt | 6 +- .../AllCodecsReferenceFingerprint.kt | 4 +- .../fingerprints/CodecsLockFingerprint.kt | 4 +- .../audio/codecs/patch/CodecsUnlockPatch.kt | 9 +- ...rint.kt => AudioOnlyEnablerFingerprint.kt} | 17 +- .../fingerprints/ExclusiveAudioFingerprint.kt | 4 +- .../patch/ExclusiveAudioPatch.kt | 30 ++-- .../fingerprints/RepeatTrackFingerprint.kt | 22 --- .../patch/PermanentRepeatPatch.kt | 36 ----- .../fingerprints/DisableShuffleFingerprint.kt | 20 --- .../patch/PermanentShufflePatch.kt | 25 --- .../CompactHeaderConstructorFingerprint.kt | 4 +- .../compactheader/patch/CompactHeaderPatch.kt | 8 +- .../MinimizedPlaybackManagerFingerprint.kt | 4 +- .../patch/MinimizedPlaybackPatch.kt | 6 +- .../fingerprints/HideGetPremiumFingerprint.kt | 4 +- .../HideGetPremiumParentFingerprint.kt | 4 +- .../premium/patch/HideGetPremiumPatch.kt | 6 +- .../PivotBarConstructorFingerprint.kt | 4 +- .../patch/RemoveUpgradeButtonPatch.kt | 17 +- .../CheckCertificateFingerprint.kt | 2 +- .../patch/BypassCertificateChecksPatch.kt | 10 +- .../GooglePlayUtilityFingerprint.kt | 2 +- .../fingerprints/ServiceCheckFingerprint.kt | 2 +- .../patch/bytecode/MicroGBytecodePatch.kt | 43 ++--- .../patch/resource/MicroGResourcePatch.kt | 5 +- .../BackgroundPlaybackDisableFingerprint.kt | 4 +- .../patch/BackgroundPlayPatch.kt | 6 +- .../misc/pro/patch/UnlockProPatch.kt | 6 +- .../patch/RemoveBroadcastsRestrictionPatch.kt | 6 +- .../IsLicenseRegisteredFingerprint.kt | 2 +- .../misc/pro/patch/UnlockProPatch.kt | 10 +- .../nyx/misc/pro/patch/UnlockProPatch.kt | 6 +- .../fingerprints/CheckSignatureFingerprint.kt | 4 +- .../patch/SignatureDetectionPatch.kt | 12 +- .../fingerprints/IsPlusUnlockedFingerprint.kt | 2 +- .../misc/unlockplus/patch/UnlockPlusPatch.kt | 10 +- .../fingerprints/IsNotPremiumFingerprint.kt | 2 +- .../patches/pixiv/ads/patch/HideAdsPatch.kt | 10 +- .../reddit/ad/banner/patch/HideBannerPatch.kt | 6 +- .../ad/comments/patch/HideCommentAdsPatch.kt | 5 +- .../fingerprints/NewAdPostFingerprint.kt | 2 +- .../reddit/ad/general/patch/HideAdsPatch.kt | 16 +- .../customclients/AbstractSpoofClientPatch.kt | 30 ++-- .../baconreader/api/patch/SpoofClientPatch.kt | 8 +- .../api/patch/SpoofClientPatch.kt | 6 +- .../api/patch/SpoofClientPatch.kt | 8 +- .../fingerprints/IsAdFreeUserFingerprint.kt | 2 +- .../ads/patch/DisableAdsPatch.kt | 10 +- .../fingerprints/GetClientIdFingerprint.kt | 4 +- .../api/patch/SpoofClientPatch.kt | 6 +- .../PiracyDetectionFingerprint.kt | 4 +- .../patch/DisablePiracyDetectionPatch.kt | 10 +- .../fingerprints/GetUserAgentFingerprint.kt | 4 +- .../redditisfun/api/patch/SpoofClientPatch.kt | 23 +-- .../api/patch/SpoofClientPatch.kt | 8 +- .../slide/api/patch/SpoofClientPatch.kt | 6 +- .../fingerprints/IsAdsEnabledFingerprint.kt | 2 +- .../ads/patch/DisableAdsPatch.kt | 10 +- .../DisableSyncForLemmyBottomSheetPatch.kt | 6 +- .../api/patch/SpoofClientPatch.kt | 16 +- .../PiracyDetectionFingerprint.kt | 6 +- .../patch/DisablePiracyDetectionPatch.kt | 6 +- .../patch/DisableScreenshotPopupPatch.kt | 10 +- .../premiumicon/patch/PremiumIconPatch.kt | 5 +- .../url/patch/SanitizeUrlQueryPatch.kt | 10 +- .../patch/RemoveDebuggingDetectionPatch.kt | 5 +- .../LayoutConstructorFingerprint.kt | 12 -- .../WatchWhileActivityFingerprint.kt | 2 +- .../patch/AbstractIntegrationsPatch.kt | 35 ++-- .../misc/patch/ResourceMappingPatch.kt | 6 +- .../CanScrollVerticallyFingerprint.kt | 4 +- .../patch/VerticalScrollPatch.kt | 12 +- .../settings/preference/BasePreference.kt | 2 +- .../settings/preference/BaseResource.kt | 2 +- .../preference/DefaultBasePreference.kt | 2 +- .../settings/preference/impl/ArrayResource.kt | 2 +- .../preference/impl/ListPreference.kt | 2 +- .../impl/NonInteractivePreference.kt | 2 +- .../settings/preference/impl/Preference.kt | 4 +- .../preference/impl/PreferenceCategory.kt | 2 +- .../preference/impl/PreferenceScreen.kt | 2 +- .../preference/impl/StringResource.kt | 2 +- .../preference/impl/SwitchPreference.kt | 2 +- .../preference/impl/TextPreference.kt | 2 +- .../patch/AbstractSettingsResourcePatch.kt | 8 +- .../settings/util/AbstractPreferenceScreen.kt | 2 +- .../fingerprints/OnReadyFingerprint.kt | 15 -- .../patch/RemoveFileSizeLimitPatch.kt | 27 ---- .../fingerprints/CreateTabsFingerprint.kt | 8 +- .../ShowNotificationFingerprint.kt | 10 +- .../songpal/badge/patch/BadgeTabPatch.kt | 10 +- .../patch/RemoveNotificationBadgePatch.kt | 10 +- .../spotify/layout/theme/patch/ThemePatch.kt | 8 +- .../fingerprints/OnDemandFingerprint.kt | 2 +- .../lite/ondemand/patch/OnDemandPatch.kt | 9 +- .../patch/PremiumNavbarTabPatch.kt | 10 +- .../fingerprints/GetSubscribedFingerprint.kt | 11 -- .../patch/UnlockSubscriptionPatch.kt | 23 --- .../themeunlock/patch/UnlockThemePatch.kt | 6 +- .../patches/tiktok/ad/patch/HideAdsPatch.kt | 17 +- .../FeedApiServiceLIZFingerprint.kt | 2 +- .../feedfilter/patch/FeedFilterPatch.kt | 9 +- .../fingerprints/ACLCommonShareFingerprint.kt | 2 +- .../ACLCommonShareFingerprint2.kt | 2 +- .../ACLCommonShareFingerprint3.kt | 2 +- .../DownloadPathParentFingerprint.kt | 2 +- .../downloads/patch/DownloadsPatch.kt | 18 ++- .../ShouldShowSeekBarFingerprint.kt | 9 -- .../seekbar/patch/ShowSeekbarPatch.kt | 24 ++- .../SpeedControlParentFingerprint.kt | 2 +- .../speed/patch/PlaybackSpeedPatch.kt | 8 +- .../annotations/IntegrationsCompatibility.kt | 13 ++ .../integrations/patch/IntegrationsPatch.kt | 2 + .../patch/DisableLoginRequirementPatch.kt | 5 +- .../GoogleAuthAvailableFingerprint.kt | 2 +- .../GoogleOneTapAuthAvailableFingerprint.kt | 2 +- .../fixgoogle/patch/FixGoogleLoginPatch.kt | 5 +- .../AddSettingsEntryFingerprint.kt | 2 +- .../misc/settings/patch/SettingsPatch.kt | 22 +-- .../misc/spoof/sim/patch/SpoofSimPatch.kt | 14 +- .../patches/trakt/patch/UnlockProPatch.kt | 14 +- .../unlock/patch/UnlockPaidWidgetsPatch.kt | 10 +- .../twitch/ad/audio/patch/AudioAdsPatch.kt | 6 +- .../ad/embedded/patch/EmbeddedAdsPatch.kt | 10 +- .../twitch/ad/video/patch/VideoAdsPatch.kt | 14 +- ...etedMessageClickableSpanCtorFingerprint.kt | 2 +- .../patch/ShowDeletedMessagesPatch.kt | 14 +- .../patch/AutoClaimChannelPointsPatch.kt | 10 +- .../twitch/debug/patch/DebugModePatch.kt | 10 +- .../annotations/IntegrationsCompatibility.kt | 8 + .../fingerprints/InitFingerprint.kt | 2 + .../integrations/patch/IntegrationsPatch.kt | 2 + .../settings/bytecode/patch/SettingsPatch.kt | 20 ++- .../MenuGroupsOnClickFingerprint.kt | 2 +- .../dynamiccolor/patch/DynamicColorPatch.kt | 10 +- .../fingerprints/JsonHookPatchFingerprint.kt | 2 +- .../misc/hook/json/patch/JsonHookPatch.kt | 16 +- .../misc/hook/patch/BaseHookPatchPatch.kt | 9 +- .../vsco/misc/pro/patch/UnlockProPatch.kt | 10 +- .../patch/FirebaseGetCertPatch.kt | 6 +- .../promocode/patch/PromoCodeUnlockPatch.kt | 6 +- .../misc/unlockpro/patch/UnlockProPatch.kt | 6 +- .../annotation/HideAdsCompatibility.kt | 2 +- .../ad/general/bytecode/patch/HideAdsPatch.kt | 15 +- .../resource/patch/HideAdsResourcePatch.kt | 6 +- .../HideGetPremiumCompatibility.kt | 2 +- .../fingerprints/GetPremiumViewFingerprint.kt | 4 +- .../HideGetPremiumVideoAdvertisementPatch.kt | 12 +- .../annotations/VideoAdsCompatibility.kt | 2 +- .../youtube/ad/video/patch/VideoAdsPatch.kt | 6 +- .../annotation/CopyVideoUrlCompatibility.kt | 2 +- .../patch/CopyVideoUrlBytecodePatch.kt | 6 +- .../patch/CopyVideoUrlResourcePatch.kt | 6 +- .../ExternalDownloadsCompatibility.kt | 2 +- .../patch/ExternalDownloadsBytecodePatch.kt | 6 +- .../patch/ExternalDownloadsResourcePatch.kt | 10 +- .../annotation/SeekbarTappingCompatibility.kt | 2 +- ...essibilityPlayerProgressTimeFingerprint.kt | 12 ++ .../OnTouchEventHandlerFingerprint.kt | 32 ---- .../fingerprints/SeekbarTappingFingerprint.kt | 6 +- .../patch/EnableSeekbarTappingPatch.kt | 64 +++++--- .../EnableSeekbarTappingResourcePatch.kt | 18 ++- .../annotation/SwipeControlsCompatibility.kt | 2 +- .../SwipeControlsHostActivityFingerprint.kt | 2 +- .../bytecode/SwipeControlsBytecodePatch.kt | 11 +- .../resource/SwipeControlsResourcePatch.kt | 5 +- .../annotations/AutoCaptionsCompatibility.kt | 2 +- .../StartVideoInformerFingerprint.kt | 4 +- .../SubtitleButtonControllerFingerprint.kt | 9 +- .../fingerprints/SubtitleTrackFingerprint.kt | 4 +- .../autocaptions/patch/AutoCaptionsPatch.kt | 6 +- .../header/patch/PremiumHeadingPatch.kt | 12 +- .../icon/patch/CustomBrandingPatch.kt | 10 +- .../annotations/HideButtonsCompatibility.kt | 2 +- .../buttons/action/patch/HideButtonsPatch.kt | 54 ++----- .../AutoplayButtonCompatibility.kt | 2 +- .../LayoutConstructorFingerprint.kt | 10 ++ .../autoplay/patch/HideAutoplayButtonPatch.kt | 20 ++- .../HideCaptionsButtonCompatibility.kt | 2 +- .../captions/patch/HideCaptionsButtonPatch.kt | 14 +- .../buttons/cast/patch/HideCastButtonPatch.kt | 12 +- .../NavigationButtonsCompatibility.kt | 2 +- .../InitializeButtonsFingerprint.kt | 2 +- .../PivotBarButtonsViewFingerprint.kt | 2 +- .../PivotBarConstructorFingerprint.kt | 2 +- .../PivotBarCreateButtonViewFingerprint.kt | 2 +- .../fingerprints/PivotBarEnumFingerprint.kt | 2 +- .../patch/NavigationButtonsPatch.kt | 17 +- .../patch/ResolvePivotBarFingerprintsPatch.kt | 15 +- .../navigation/utils/InjectionUtils.kt | 4 +- .../HidePlayerButtonsCompatibility.kt | 2 +- ...layerControlsVisibilityModelFingerprint.kt | 2 +- .../hide/patch/HidePlayerButtonsPatch.kt | 11 +- .../annotations/AlbumCardsCompatibility.kt | 2 +- .../fingerprints/AlbumCardsFingerprint.kt | 4 +- .../bytecode/patch/AlbumCardsPatch.kt | 12 +- .../resource/patch/AlbumCardsResourcePatch.kt | 6 +- .../annotations/BreakingNewsCompatibility.kt | 2 +- .../fingerprints/BreakingNewsFingerprint.kt | 4 +- .../bytecode/patch/BreakingNewsPatch.kt | 12 +- .../patch/BreakingNewsResourcePatch.kt | 6 +- .../annotations/HideCommentsCompatibility.kt | 2 +- .../hide/comments/patch/CommentsPatch.kt | 6 +- .../CrowdfundingBoxCompatibility.kt | 2 +- .../CrowdfundingBoxFingerprint.kt | 4 +- .../bytecode/patch/CrowdfundingBoxPatch.kt | 12 +- .../patch/CrowdfundingBoxResourcePatch.kt | 6 +- .../HideEndscreenCardsCompatibility.kt | 2 +- .../fingerprints/LayoutCircleFingerprint.kt | 2 +- .../fingerprints/LayoutIconFingerprint.kt | 2 +- .../fingerprints/LayoutVideoFingerprint.kt | 2 +- .../bytecode/patch/HideEndscreenCardsPatch.kt | 12 +- .../patch/HideEndscreenCardsResourcePatch.kt | 6 +- .../filterbar/annotations/HideFilterBar.kt | 2 +- .../FilterBarHeightFingerprint.kt | 4 +- .../RelatedChipCloudFingerprint.kt | 4 +- .../SearchResultsChipBarFingerprint.kt | 4 +- .../filterbar/patch/HideFilterBarPatch.kt | 14 +- .../patch/HideFilterBarResourcePatch.kt | 6 +- ...deFloatingMicrophoneButtonCompatibility.kt | 2 +- ...ShowFloatingMicrophoneButtonFingerprint.kt | 4 +- .../HideFloatingMicrophoneButtonPatch.kt | 12 +- ...deFloatingMicrophoneButtonResourcePatch.kt | 9 +- .../HideLayoutComponentsCompatibility.kt | 2 +- .../ConvertElementToFlatBufferFingerprint.kt | 9 ++ .../ParseElementFromBufferFingerprint.kt | 10 -- .../patch/HideLayoutComponentsPatch.kt | 44 ++--- .../annotations/HideInfocardsCompatibility.kt | 2 +- .../InfocardsIncognitoFingerprint.kt | 2 +- .../InfocardsIncognitoParentFingerprint.kt | 2 +- .../InfocardsMethodCallFingerprint.kt | 2 +- .../infocards/patch/HideInfoCardsPatch.kt | 12 +- .../patch/HideInfocardsResourcePatch.kt | 6 +- .../HideLoadMoreButtonCompatibility.kt | 2 +- .../HideLoadMoreButtonFingerprint.kt | 9 +- .../bytecode/patch/HideLoadMoreButtonPatch.kt | 12 +- .../patch/HideLoadMoreButtonResourcePatch.kt | 6 +- .../HideEmailAddressCompatibility.kt | 2 +- ...ntSwitcherAccessibilityLabelFingerprint.kt | 2 +- .../bytecode/patch/HideEmailAddressPatch.kt | 12 +- .../patch/HideEmailAddressResourcePatch.kt | 6 +- .../HidePlayerFlyoutMenuItemsCompatibility.kt | 2 +- .../patch/HidePlayerFlyoutMenuPatch.kt | 6 +- .../HidePlayerOverlayPatchCompatibility.kt} | 4 +- .../CreatePlayerOverviewFingerprint.kt | 11 +- .../bytecode/patch/HidePlayerOverlayPatch.kt | 48 ++++++ .../patch/HidePlayerOverlayResourcePatch.kt | 35 ++++ .../annotations/HideSeekbarCompatibility.kt | 2 +- .../hide/seekbar/patch/HideSeekbarPatch.kt | 6 +- .../HideShortsComponentsCompatibility.kt | 2 +- .../BottomNavigationBarFingerprint.kt | 2 +- .../CreateShortsButtonsFingerprint.kt | 6 +- .../ReelConstructorFingerprint.kt | 4 +- .../RenderBottomNavigationBarFingerprint.kt | 2 +- .../SetPivotBarVisibilityFingerprint.kt | 2 +- .../patch/HideShortsComponentsPatch.kt | 28 ++-- .../HideShortsComponentsResourcePatch.kt | 12 +- .../time/annotations/HideTimeCompatibility.kt | 2 +- .../fingerprints/TimeCounterFingerprint.kt | 34 ++-- .../hide/time/patch/HideTimestampPatch.kt | 10 +- .../annotations/HideWatermarkCompatibility.kt | 2 +- .../fingerprints/HideWatermarkFingerprint.kt | 2 +- .../HideWatermarkParentFingerprint.kt | 2 +- .../watermark/patch/HideWatermarkPatch.kt | 10 +- .../FullscreenPanelsCompatibility.kt | 8 + .../FullscreenViewAdderFingerprint.kt | 11 ++ .../FullscreenViewAdderParentFingerprint.kt | 20 +++ .../patch/FullscreenPanelsRemoverPatch.kt | 63 ++++++++ .../PlayerPopupPanelsCompatibility.kt | 2 +- .../EngagementPanelControllerFingerprint.kt | 2 +- .../popup/patch/PlayerPopupPanelsPatch.kt | 10 +- .../PlayerControlsBackgroundCompatibility.kt | 2 +- .../patch/PlayerControlsBackgroundPatch.kt | 6 +- .../PlayerOverlayPatchCompatibility.kt | 8 - .../patch/CustomPlayerOverlayOpacityPatch.kt | 45 ------ ...CustomPlayerOverlayOpacityResourcePatch.kt | 38 ----- .../ReturnYouTubeDislikeCompatibility.kt | 2 +- .../DislikesOldLayoutTextViewFingerprint.kt | 4 +- .../fingerprints/ShortsTextViewFingerprint.kt | 8 +- ...TextComponentAtomicReferenceFingerprint.kt | 22 +-- .../TextComponentConstructorFingerprint.kt | 2 +- .../TextComponentContextFingerprint.kt | 4 +- .../patch/ReturnYouTubeDislikePatch.kt | 75 ++++----- .../ReturnYouTubeDislikeResourcePatch.kt | 6 +- .../annotations/WideSearchbarCompatibility.kt | 2 +- .../CreateSearchSuggestionsFingerprint.kt | 2 +- .../SetWordmarkHeaderFingerprint.kt | 4 +- .../searchbar/patch/WideSearchbarPatch.kt | 13 +- .../PlayerSeekbarColorFingerprint.kt | 2 +- .../SetSeekbarClickedColorFingerprint.kt | 2 +- .../ShortsSeekbarColorFingerprint.kt | 2 +- .../patch/SeekbarColorBytecodePatch.kt | 19 ++- .../resource/SeekbarColorResourcePatch.kt | 11 +- .../resource/SeekbarPreferencesPatch.kt | 4 +- .../annotations/SponsorBlockCompatibility.kt | 2 +- .../fingerprints/AppendTimeFingerprint.kt | 4 +- .../ControlsOverlayFingerprint.kt | 11 +- .../RectangleFieldInvalidatorFingerprint.kt | 4 +- .../patch/SponsorBlockBytecodePatch.kt | 58 +++---- .../patch/SponsorBlockResourcePatch.kt | 6 +- .../SpoofAppVersionCompatibility.kt | 2 +- .../SpoofAppVersionFingerprint.kt | 4 +- .../bytecode/patch/SpoofAppVersionPatch.kt | 12 +- .../StartupShortsResetCompatibility.kt | 2 +- .../UserWasInShortsFingerprint.kt | 4 +- .../patch/DisableShortsOnStartupPatch.kt | 6 +- .../fingerprints/GetFormFactorFingerprint.kt | 25 --- .../tablet/patch/EnableTabletLayoutPatch.kt | 56 ------- .../TabletMiniPlayerCompatibility.kt | 2 +- ...erDimensionsCalculatorParentFingerprint.kt | 4 +- .../MiniPlayerOverrideFingerprint.kt | 21 ++- .../MiniPlayerOverrideNoContextFingerprint.kt | 4 +- .../MiniPlayerOverrideParentFingerprint.kt | 7 + ...PlayerResponseModelSizeCheckFingerprint.kt | 4 +- .../patch/TabletMiniPlayerPatch.kt | 63 ++++---- .../fingerprints/LithoThemeFingerprint.kt | 4 +- .../bytecode/patch/LithoColorHookPatch.kt | 10 +- .../bytecode/patch/ThemeBytecodePatch.kt | 4 +- .../theme/resource/ThemeResourcePatch.kt | 10 +- ...tURLRequestCallbackOnFailureFingerprint.kt | 14 -- ...estCallbackOnResponseStartedFingerprint.kt | 21 --- ...RLRequestCallbackOnSucceededFingerprint.kt | 14 -- .../MessageDigestImageUrlFingerprint.kt | 10 -- .../MessageDigestImageUrlParentFingerprint.kt | 12 -- .../patch/AlternativeThumbnailsPatch.kt | 153 ------------------ .../annotations/AutoRepeatCompatibility.kt | 2 +- .../fingerprints/AutoRepeatFingerprint.kt | 2 +- .../AutoRepeatParentFingerprint.kt | 2 +- .../misc/autorepeat/patch/AutoRepeatPatch.kt | 13 +- .../CreateBottomSheetFingerprint.kt | 2 +- .../hook/patch/BottomSheetHookPatch.kt | 12 +- .../patch/BottomSheetHookResourcePatch.kt | 10 +- .../misc/debugging/patch/DebuggingPatch.kt | 15 +- .../FixBackToExitGestureCompatibility.kt | 2 +- .../fingerprints/OnBackPressedFingerprint.kt | 4 +- .../RecyclerViewScrollingFingerprint.kt | 4 +- .../RecyclerViewTopScrollingFingerprint.kt | 4 +- ...cyclerViewTopScrollingParentFingerprint.kt | 4 +- .../patch/FixBackToExitGesturePatch.kt | 21 ++- .../annotations/ClientSpoofCompatibility.kt | 2 +- .../ProtobufParameterBuilderFingerprint.kt | 2 +- .../ScrubbedPreviewLayoutFingerprint.kt | 4 +- .../StoryboardThumbnailFingerprint.kt | 4 +- .../StoryboardThumbnailParentFingerprint.kt | 2 +- .../UserAgentHeaderBuilderFingerprint.kt | 2 +- .../fix/playback/patch/ClientSpoofPatch.kt | 12 +- .../patch/SpoofSignatureVerificationPatch.kt | 19 ++- ...SpoofSignatureVerificationResourcePatch.kt | 15 +- .../annotations/IntegrationsCompatibility.kt} | 6 +- .../APIPlayerServiceFingerprint.kt | 2 +- ...mbeddedPlayerControlsOverlayFingerprint.kt | 2 +- .../fingerprints/EmbeddedPlayerFingerprint.kt | 2 +- .../RemoteEmbedFragmentFingerprint.kt | 2 +- .../RemoteEmbeddedPlayerFingerprint.kt | 2 +- .../StandalonePlayerActivityFingerprint.kt | 2 +- .../integrations/patch/IntegrationsPatch.kt | 10 +- .../OpenLinksExternallyCompatibility.kt | 4 +- .../BindSessionServiceFingerprint.kt | 17 ++ .../GetCustomTabPackageNameFingerprint.kt | 18 +++ .../InitializeCustomTabSupportFingerprint.kt | 18 +++ .../open/patch/OpenLinksExternallyPatch.kt | 63 ++++++++ .../links/patch/OpenLinksExternallyPatch.kt | 63 -------- .../ComponentContextParserFingerprint.kt | 2 +- .../EmptyComponentBuilderFingerprint.kt | 2 +- .../fingerprints/LithoFilterFingerprint.kt | 2 +- .../ProtobufBufferReferenceFingerprint.kt | 4 +- .../ReadComponentIdentifierFingerprint.kt | 2 +- .../litho/filter/patch/LithoFilterPatch.kt | 82 ++++++---- .../annotations/MicroGPatchCompatibility.kt | 2 +- .../GooglePlayUtilityFingerprint.kt | 2 +- .../fingerprints/ServiceCheckFingerprint.kt | 2 +- .../patch/bytecode/MicroGBytecodePatch.kt | 6 +- .../patch/resource/MicroGResourcePatch.kt | 6 +- .../MinimizedPlaybackCompatibility.kt | 2 +- ...izedPlaybackPolicyControllerFingerprint.kt | 27 ++-- .../MinimizedPlaybackManagerFingerprint.kt | 4 +- .../MinimizedPlaybackSettingsFingerprint.kt | 4 +- ...imizedPlaybackSettingsParentFingerprint.kt | 2 +- .../patch/MinimizedPlaybackPatch.kt | 21 ++- .../annotation/PlayerControlsCompatibility.kt | 2 +- .../patch/PlayerControlsBytecodePatch.kt | 21 +-- .../BottomControlsInflateFingerprint.kt | 4 +- .../PlayerControlsVisibilityFingerprint.kt | 7 +- .../patch/BottomControlsResourcePatch.kt | 8 +- .../PlayerOverlaysHookCompatibility.kt | 2 +- .../patch/PlayerOverlaysHookPatch.kt | 5 +- .../annotation/PlayerTypeHookCompatibility.kt | 2 +- .../fingerprint/PlayerTypeFingerprint.kt | 24 ++- .../fingerprint/VideoStateFingerprint.kt | 9 +- .../playertype/patch/PlayerTypeHookPatch.kt | 28 ++-- .../LicenseActivityFingerprint.kt | 2 +- .../fingerprints/SetThemeFingerprint.kt | 4 +- .../settings/bytecode/patch/SettingsPatch.kt | 18 ++- .../resource/patch/SettingsResourcePatch.kt | 8 +- .../zoomhaptics/patch/ZoomHapticsPatch.kt | 6 +- .../annotations/HDRBrightnessCompatibility.kt | 2 +- .../fingerprints/HDRBrightnessFingerprint.kt | 2 +- .../hdrbrightness/patch/HDRBrightnessPatch.kt | 12 +- .../VideoInformationCompatibility.kt | 2 +- .../OnPlaybackSpeedItemClickFingerprint.kt | 4 +- ...erControllerSetTimeReferenceFingerprint.kt | 2 +- .../fingerprints/VideoLengthFingerprint.kt | 2 +- .../patch/VideoInformationPatch.kt | 31 ++-- .../RememberVideoQualityCompatibility.kt | 2 +- .../NewVideoQualityChangedFingerprint.kt | 4 +- ...dexMethodClassFieldReferenceFingerprint.kt | 2 +- .../VideoQualitySetterFingerprint.kt | 4 +- .../patch/RememberVideoQualityPatch.kt | 28 ++-- .../youtube/video/speed/PlaybackSpeed.kt | 5 +- .../video/speed/PlaybackSpeedCompatibility.kt | 2 +- .../SpeedArrayGeneratorFingerprint.kt | 4 +- .../fingerprints/SpeedLimiterFingerprint.kt | 4 +- .../custom/patch/CustomPlaybackSpeedPatch.kt | 36 +++-- .../patch/RememberPlaybackSpeedPatch.kt | 12 +- .../annotation/VideoIdCompatibility.kt | 2 +- .../videoid/fingerprint/VideoIdFingerprint.kt | 10 +- .../VideoIdFingerprintBackgroundPlay.kt | 25 +-- .../video/videoid/patch/VideoIdPatch.kt | 51 +++--- .../OldVideoQualityMenuCompatibility.kt | 2 +- .../VideoQualityMenuViewInflateFingerprint.kt | 4 +- .../patch/OldVideoQualityMenuPatch.kt | 8 +- .../patch/OldVideoQualityMenuResourcePatch.kt | 10 +- .../fingerprints/ContainsAdFingerprint.kt | 4 +- .../ad/general/patch/HideAdsPatch.kt | 12 +- .../fingerprints/IsPremiumFingerprint.kt | 4 +- .../YukaUserConstructorFingerprint.kt | 2 +- .../unlockpremium/patch/UnlockPremiunPatch.kt | 5 +- .../util/microg/MicroGBytecodeHelper.kt | 34 ++-- .../AbstractTransformInstructionsPatch.kt | 14 +- .../util/patch/LiteralValueFingerprint.kt | 2 +- .../app/revanced/util/patch/MethodCall.kt | 18 +-- .../revanced/util/resources/ResourceUtils.kt | 15 +- 496 files changed, 2551 insertions(+), 2425 deletions(-) delete mode 100644 src/main/kotlin/app/revanced/patches/all/misc/network/patch/OverrideCertificatePinningPatch.kt delete mode 100644 src/main/kotlin/app/revanced/patches/duolingo/unlocksuper/fingerprints/IsUserSuperMethodFingerprint.kt delete mode 100644 src/main/kotlin/app/revanced/patches/duolingo/unlocksuper/fingerprints/UserSerializationMethodFingerprint.kt delete mode 100644 src/main/kotlin/app/revanced/patches/duolingo/unlocksuper/patch/UnlockDuolingoSuperPatch.kt delete mode 100644 src/main/kotlin/app/revanced/patches/lightroom/misc/login/annotations/DisableMandatoryLoginCompatibility.kt delete mode 100644 src/main/kotlin/app/revanced/patches/lightroom/misc/login/fingerprint/IsLoggedInFingerprint.kt delete mode 100644 src/main/kotlin/app/revanced/patches/lightroom/misc/login/patch/DisableMandatoryLoginPatch.kt delete mode 100644 src/main/kotlin/app/revanced/patches/lightroom/misc/premium/annotations/UnlockPremiumCompatibility.kt delete mode 100644 src/main/kotlin/app/revanced/patches/lightroom/misc/premium/fingerprint/HasPurchasedFingerprint.kt delete mode 100644 src/main/kotlin/app/revanced/patches/lightroom/misc/premium/patch/UnlockPremiumPatch.kt rename src/main/kotlin/app/revanced/patches/music/audio/exclusiveaudio/fingerprints/{AllowExclusiveAudioPlaybackFingerprint.kt => AudioOnlyEnablerFingerprint.kt} (56%) delete mode 100644 src/main/kotlin/app/revanced/patches/music/interaction/permanentrepeat/fingerprints/RepeatTrackFingerprint.kt delete mode 100644 src/main/kotlin/app/revanced/patches/music/interaction/permanentrepeat/patch/PermanentRepeatPatch.kt delete mode 100644 src/main/kotlin/app/revanced/patches/music/interaction/permanentshuffle/fingerprints/DisableShuffleFingerprint.kt delete mode 100644 src/main/kotlin/app/revanced/patches/music/interaction/permanentshuffle/patch/PermanentShufflePatch.kt delete mode 100644 src/main/kotlin/app/revanced/patches/shared/fingerprints/LayoutConstructorFingerprint.kt delete mode 100644 src/main/kotlin/app/revanced/patches/solidexplorer2/functionality/filesize/fingerprints/OnReadyFingerprint.kt delete mode 100644 src/main/kotlin/app/revanced/patches/solidexplorer2/functionality/filesize/patch/RemoveFileSizeLimitPatch.kt delete mode 100644 src/main/kotlin/app/revanced/patches/strava/subscription/fingerprints/GetSubscribedFingerprint.kt delete mode 100644 src/main/kotlin/app/revanced/patches/strava/subscription/patch/UnlockSubscriptionPatch.kt delete mode 100644 src/main/kotlin/app/revanced/patches/tiktok/interaction/seekbar/fingerprints/ShouldShowSeekBarFingerprint.kt create mode 100644 src/main/kotlin/app/revanced/patches/tiktok/misc/integrations/annotations/IntegrationsCompatibility.kt create mode 100644 src/main/kotlin/app/revanced/patches/twitch/misc/integrations/annotations/IntegrationsCompatibility.kt create mode 100644 src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/fingerprints/AccessibilityPlayerProgressTimeFingerprint.kt delete mode 100644 src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/fingerprints/OnTouchEventHandlerFingerprint.kt create mode 100644 src/main/kotlin/app/revanced/patches/youtube/layout/buttons/autoplay/fingerprints/LayoutConstructorFingerprint.kt create mode 100644 src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/fingerprints/ConvertElementToFlatBufferFingerprint.kt delete mode 100644 src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/fingerprints/ParseElementFromBufferFingerprint.kt rename src/main/kotlin/app/revanced/patches/youtube/layout/{tablet/annotations/EnableTabletLayoutCompatibility.kt => hide/player/overlay/annotations/HidePlayerOverlayPatchCompatibility.kt} (57%) rename src/main/kotlin/app/revanced/patches/youtube/layout/{ => hide}/player/overlay/bytecode/fingerprints/CreatePlayerOverviewFingerprint.kt (54%) create mode 100644 src/main/kotlin/app/revanced/patches/youtube/layout/hide/player/overlay/bytecode/patch/HidePlayerOverlayPatch.kt create mode 100644 src/main/kotlin/app/revanced/patches/youtube/layout/hide/player/overlay/resource/patch/HidePlayerOverlayResourcePatch.kt create mode 100644 src/main/kotlin/app/revanced/patches/youtube/layout/panels/fullscreen/remove/annotations/FullscreenPanelsCompatibility.kt create mode 100644 src/main/kotlin/app/revanced/patches/youtube/layout/panels/fullscreen/remove/patch/FullscreenPanelsRemoverPatch.kt delete mode 100644 src/main/kotlin/app/revanced/patches/youtube/layout/player/overlay/annotations/PlayerOverlayPatchCompatibility.kt delete mode 100644 src/main/kotlin/app/revanced/patches/youtube/layout/player/overlay/bytecode/patch/CustomPlayerOverlayOpacityPatch.kt delete mode 100644 src/main/kotlin/app/revanced/patches/youtube/layout/player/overlay/resource/patch/CustomPlayerOverlayOpacityResourcePatch.kt delete mode 100644 src/main/kotlin/app/revanced/patches/youtube/layout/tablet/fingerprints/GetFormFactorFingerprint.kt delete mode 100644 src/main/kotlin/app/revanced/patches/youtube/layout/tablet/patch/EnableTabletLayoutPatch.kt create mode 100644 src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/fingerprints/MiniPlayerOverrideParentFingerprint.kt delete mode 100644 src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/fingerprints/CronetURLRequestCallbackOnFailureFingerprint.kt delete mode 100644 src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/fingerprints/CronetURLRequestCallbackOnResponseStartedFingerprint.kt delete mode 100644 src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/fingerprints/CronetURLRequestCallbackOnSucceededFingerprint.kt delete mode 100644 src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/fingerprints/MessageDigestImageUrlFingerprint.kt delete mode 100644 src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/fingerprints/MessageDigestImageUrlParentFingerprint.kt delete mode 100644 src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/patch/AlternativeThumbnailsPatch.kt rename src/main/kotlin/app/revanced/patches/youtube/{layout/thumbnails/annotations/AlternativeThumbnailsCompatibility.kt => misc/integrations/annotations/IntegrationsCompatibility.kt} (53%) rename src/main/kotlin/app/revanced/patches/youtube/misc/links/{ => open}/annotations/OpenLinksExternallyCompatibility.kt (65%) create mode 100644 src/main/kotlin/app/revanced/patches/youtube/misc/links/open/fingerprints/BindSessionServiceFingerprint.kt create mode 100644 src/main/kotlin/app/revanced/patches/youtube/misc/links/open/fingerprints/GetCustomTabPackageNameFingerprint.kt create mode 100644 src/main/kotlin/app/revanced/patches/youtube/misc/links/open/fingerprints/InitializeCustomTabSupportFingerprint.kt create mode 100644 src/main/kotlin/app/revanced/patches/youtube/misc/links/open/patch/OpenLinksExternallyPatch.kt delete mode 100644 src/main/kotlin/app/revanced/patches/youtube/misc/links/patch/OpenLinksExternallyPatch.kt diff --git a/build.gradle.kts b/build.gradle.kts index 88bcaec7b..8a3149d6c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -4,15 +4,17 @@ plugins { group = "app.revanced" +val githubUsername: String = project.findProperty("gpr.user") as? String ?: System.getenv("GITHUB_ACTOR") +val githubPassword: String = project.findProperty("gpr.key") as? String ?: System.getenv("GITHUB_TOKEN") + repositories { mavenCentral() mavenLocal() - google() maven { url = uri("https://maven.pkg.github.com/revanced/revanced-patcher") credentials { - username = project.findProperty("gpr.user") as? String ?: System.getenv("GITHUB_ACTOR") - password = project.findProperty("gpr.key") as? String ?: System.getenv("GITHUB_TOKEN") + username = githubUsername + password = githubPassword } } // Required for FlexVer-Java @@ -25,15 +27,15 @@ repositories { } dependencies { - implementation("app.revanced:revanced-patcher:14.0.0") - implementation("com.android.tools.smali:smali:3.0.3") - // Required because build fails without it. - // TODO: Find a way to remove this dependency. - implementation("com.google.guava:guava:32.1.2-jre") - // Used in JsonGenerator. + implementation("app.revanced:revanced-patcher:11.0.4") + implementation("app.revanced:multidexlib2:2.5.3-a3836654") + // Required for meta implementation("com.google.code.gson:gson:2.10.1") + // Required for FlexVer-Java + implementation("com.unascribed:flexver-java:1.0.2") + // A dependency to the Android library unfortunately fails the build, - // which is why this is required for the patch change-oauth-client-id. + // which is why this is required for the patch change-oauth-client-id compileOnly(project("dummy")) } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ac72c34e8..62f495dfe 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/src/main/kotlin/app/revanced/extensions/Extensions.kt b/src/main/kotlin/app/revanced/extensions/Extensions.kt index 226f4b143..e90fbdcfe 100644 --- a/src/main/kotlin/app/revanced/extensions/Extensions.kt +++ b/src/main/kotlin/app/revanced/extensions/Extensions.kt @@ -1,26 +1,25 @@ package app.revanced.extensions -import app.revanced.patcher.data.BytecodeContext -import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.MethodFingerprintExtensions.name +import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import app.revanced.patcher.patch.PatchException +import app.revanced.patcher.patch.PatchResultError import app.revanced.patcher.util.proxy.mutableTypes.MutableClass import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch -import com.android.tools.smali.dexlib2.Opcode -import com.android.tools.smali.dexlib2.iface.Method -import com.android.tools.smali.dexlib2.iface.instruction.WideLiteralInstruction -import com.android.tools.smali.dexlib2.util.MethodUtil +import org.jf.dexlib2.Opcode +import org.jf.dexlib2.iface.Method +import org.jf.dexlib2.iface.instruction.WideLiteralInstruction +import org.jf.dexlib2.util.MethodUtil import org.w3c.dom.Node +// TODO: populate this to all patches /** - * The [PatchException] of failing to resolve a [MethodFingerprint]. + * Convert a [MethodFingerprint] to a [PatchResultError]. * - * @return The [PatchException]. + * @return A [PatchResultError] for the [MethodFingerprint]. */ -val MethodFingerprint.exception - get() = PatchException("Failed to resolve $name") +internal fun MethodFingerprint.toErrorResult() = PatchResultError("Failed to resolve $name") /** * Find the [MutableMethod] from a given [Method] in a [MutableClass]. @@ -28,27 +27,27 @@ val MethodFingerprint.exception * @param method The [Method] to find. * @return The [MutableMethod]. */ -fun MutableClass.findMutableMethodOf(method: Method) = this.methods.first { +internal fun MutableClass.findMutableMethodOf(method: Method) = this.methods.first { MethodUtil.methodSignaturesMatch(it, method) } /** - * apply a transform to all methods of the class. + * apply a transform to all methods of the class * - * @param transform the transformation function. original method goes in, transformed method goes out. + * @param transform the transformation function. original method goes in, transformed method goes out */ -fun MutableClass.transformMethods(transform: MutableMethod.() -> MutableMethod) { +internal fun MutableClass.transformMethods(transform: MutableMethod.() -> MutableMethod) { val transformedMethods = methods.map { it.transform() } methods.clear() methods.addAll(transformedMethods) } -fun Node.doRecursively(action: (Node) -> Unit) { +internal fun Node.doRecursively(action: (Node) -> Unit) { action(this) for (i in 0 until this.childNodes.length) this.childNodes.item(i).doRecursively(action) } -fun MutableMethod.injectHideViewCall( +internal fun MutableMethod.injectHideViewCall( insertIndex: Int, viewRegister: Int, classDescriptor: String, @@ -58,13 +57,7 @@ fun MutableMethod.injectHideViewCall( "invoke-static { v$viewRegister }, $classDescriptor->$targetMethod(Landroid/view/View;)V" ) -/** - * Find the index of the first constant instruction with the id of the given resource name. - * - * @param resourceName the name of the resource to find the id for. - * @return the index of the first constant instruction with the id of the given resource name, or -1 if not found. - */ -fun Method.findIndexForIdResource(resourceName: String): Int { +internal fun Method.findIndexForIdResource(resourceName: String): Int { fun getIdResourceId(resourceName: String) = ResourceMappingPatch.resourceMappings.single { it.type == "id" && it.name == resourceName }.id @@ -73,8 +66,6 @@ fun Method.findIndexForIdResource(resourceName: String): Int { } /** - * Find the index of the first constant instruction with the given value. - * * @return the first constant instruction with the value, or -1 if not found. */ fun Method.indexOfFirstConstantInstructionValue(constantValue: Long): Int { @@ -86,23 +77,8 @@ fun Method.indexOfFirstConstantInstructionValue(constantValue: Long): Int { } /** - * Check if the method contains a constant with the given value. - * * @return if the method contains a constant with the given value. */ fun Method.containsConstantInstructionValue(constantValue: Long): Boolean { return indexOfFirstConstantInstructionValue(constantValue) >= 0 } - -/** - * Traverse the class hierarchy starting from the given root class. - * - * @param targetClass the class to start traversing the class hierarchy from. - * @param callback function that is called for every class in the hierarchy. - */ -fun BytecodeContext.traverseClassHierarchy(targetClass: MutableClass, callback: MutableClass.() -> Unit) { - callback(targetClass) - this.findClass(targetClass.superclass ?: return)?.mutableClass?.let { - traverseClassHierarchy(it, callback) - } -} \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/meta/JsonGenerator.kt b/src/main/kotlin/app/revanced/meta/JsonGenerator.kt index 3be7793f8..cebf57d91 100644 --- a/src/main/kotlin/app/revanced/meta/JsonGenerator.kt +++ b/src/main/kotlin/app/revanced/meta/JsonGenerator.kt @@ -6,6 +6,7 @@ import app.revanced.patcher.extensions.PatchExtensions.description import app.revanced.patcher.extensions.PatchExtensions.include import app.revanced.patcher.extensions.PatchExtensions.options import app.revanced.patcher.extensions.PatchExtensions.patchName +import app.revanced.patcher.extensions.PatchExtensions.version import app.revanced.patcher.patch.PatchOption import com.google.gson.GsonBuilder import java.io.File @@ -16,6 +17,7 @@ internal class JsonGenerator : PatchesFileGenerator { JsonPatch( it.patchName, it.description ?: "This patch has no description.", + it.version ?: "0.0.0", !it.include, it.options?.map { option -> JsonPatch.Option( @@ -46,6 +48,7 @@ internal class JsonGenerator : PatchesFileGenerator { private class JsonPatch( val name: String, val description: String, + val version: String, val excluded: Boolean, val options: Array