mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-17 23:07:18 +02:00
chore: ReadmeGenerator
now generates the minimum and maximum supported versions
This commit is contained in:
parent
72bf47f1d1
commit
e619c4bf60
201
README.md
201
README.md
@ -9,107 +9,107 @@ The official ReVanced Extended Patches.
|
||||
|
||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||
|:--------:|:--------------:|:-----------------:|
|
||||
| `add-splash-animation` | Adds splash animation, which was removed in YT v18.19.36+. This patch cannot be used with 'custom-branding-icon' patch | 18.30.37 |
|
||||
| `bypass-ambient-mode-restrictions` | Bypass ambient mode restrictions in battery saver mode. | 18.30.37 |
|
||||
| `change-homepage` | Change home page to subscription feed. | 18.30.37 |
|
||||
| `custom-branding-youtube-name` | Rename the YouTube app to the name specified in options.json. | 18.30.37 |
|
||||
| `custom-branding-icon-mmt` | Changes the YouTube launcher icon to MMT. | 18.30.37 |
|
||||
| `custom-branding-icon-revancify-blue` | Changes the YouTube launcher icon to Revancify Blue. | 18.30.37 |
|
||||
| `custom-branding-icon-revancify-red` | Changes the YouTube launcher icon to Revancify Red. | 18.30.37 |
|
||||
| `custom-double-tap-length` | Add 'double-tap to seek' value. | 18.30.37 |
|
||||
| `add-splash-animation` | Adds splash animation, which was removed in YT v18.19.36+. This patch cannot be used with 'custom-branding-icon' patch | 18.20.39 ~ 18.30.37 |
|
||||
| `bypass-ambient-mode-restrictions` | Bypass ambient mode restrictions in battery saver mode. | 18.20.39 ~ 18.30.37 |
|
||||
| `change-homepage` | Change home page to subscription feed. | 18.20.39 ~ 18.30.37 |
|
||||
| `custom-branding-youtube-name` | Rename the YouTube app to the name specified in options.json. | 18.20.39 ~ 18.30.37 |
|
||||
| `custom-branding-icon-mmt` | Changes the YouTube launcher icon to MMT. | 18.20.39 ~ 18.30.37 |
|
||||
| `custom-branding-icon-revancify-blue` | Changes the YouTube launcher icon to Revancify Blue. | 18.20.39 ~ 18.30.37 |
|
||||
| `custom-branding-icon-revancify-red` | Changes the YouTube launcher icon to Revancify Red. | 18.20.39 ~ 18.30.37 |
|
||||
| `custom-double-tap-length` | Add 'double-tap to seek' value. | 18.20.39 ~ 18.30.37 |
|
||||
| `custom-package-name` | Specifies the package name for YouTube and YT Music in the MicroG build. | all |
|
||||
| `custom-playback-speed` | Adds more playback speed options. | 18.30.37 |
|
||||
| `custom-seekbar-color` | Change seekbar color in video player and video thumbnails. | 18.30.37 |
|
||||
| `default-playback-speed` | Adds ability to set default playback speed settings. | 18.30.37 |
|
||||
| `default-video-quality` | Adds ability to set default video quality settings. | 18.30.37 |
|
||||
| `disable-quic-protocol` | Disable CronetEngine's QUIC protocol. | 18.30.37 |
|
||||
| `disable-shorts-on-startup` | Disables playing YouTube Shorts when launching YouTube. | 18.30.37 |
|
||||
| `disable-auto-captions` | Disables forced auto captions. | 18.30.37 |
|
||||
| `disable-haptic-feedback` | Disable haptic feedback when swiping. | 18.30.37 |
|
||||
| `disable-hdr-video` | Disable HDR video. | 18.30.37 |
|
||||
| `disable-landscape-mode` | Disable landscape mode when entering fullscreen. | 18.30.37 |
|
||||
| `disable-pip-notification` | Disable pip notification when you first launch pip mode. | 18.30.37 |
|
||||
| `enable-compact-controls-overlay` | Enables compact control overlay. | 18.30.37 |
|
||||
| `enable-debug-logging` | Adds debugging options. | 18.30.37 |
|
||||
| `enable-external-browser` | Open url outside the app in an external browser. | 18.30.37 |
|
||||
| `enable-minimized-playback` | Enables minimized and background playback. | 18.30.37 |
|
||||
| `enable-new-comment-popup-panels` | Enables a new type of comment popup panel in the shorts player. | 18.30.37 |
|
||||
| `enable-new-splash-animation` | Enables a new type of splash animation. | 18.30.37 |
|
||||
| `enable-new-thumbnail-preview` | Enables a new type of thumbnail preview. | 18.30.37 |
|
||||
| `enable-old-quality-layout` | Enables the original quality flyout menu. | 18.30.37 |
|
||||
| `enable-open-links-directly` | Skips over redirection URLs to external links. | 18.30.37 |
|
||||
| `enable-seekbar-tapping` | Enables tap-to-seek on the seekbar of the video player. | 18.30.37 |
|
||||
| `enable-tablet-mini-player` | Enables the tablet mini player layout. | 18.30.37 |
|
||||
| `enable-tablet-navigation-bar` | Enables the tablet navigation bar. | 18.30.37 |
|
||||
| `enable-time-stamps-speed` | Add the current playback speed in brackets next to the current time. | 18.30.37 |
|
||||
| `enable-wide-search-bar` | Replaces the search icon with a wide search bar. This will hide the YouTube logo when active. | 18.30.37 |
|
||||
| `force-opus-codec` | Forces the OPUS codec for audios. | 18.30.37 |
|
||||
| `force-vp9-codec` | Forces the VP9 codec for videos. | 18.30.37 |
|
||||
| `force-hide-player-button-background` | Force hides the background from the video player buttons. | 18.30.37 |
|
||||
| `force-premium-heading` | Forces premium heading on the homepage. | 18.30.37 |
|
||||
| `header-switch` | Add switch to change header. | 18.30.37 |
|
||||
| `hide-account-menu` | Hide account menu elements. | 18.30.37 |
|
||||
| `hide-auto-player-popup-panels` | Hide automatic popup panels (playlist or live chat) on video player. | 18.30.37 |
|
||||
| `hide-autoplay-button` | Hides the autoplay button in the video player. | 18.30.37 |
|
||||
| `hide-autoplay-preview` | Hides the autoplay preview container in the fullscreen. | 18.30.37 |
|
||||
| `hide-button-container` | Adds the options to hide action buttons under a video. | 18.30.37 |
|
||||
| `hide-captions-button` | Hides the captions button in the video player. | 18.30.37 |
|
||||
| `hide-cast-button` | Hides the cast button in the video player. | 18.30.37 |
|
||||
| `hide-category-bar` | Hides the category bar in video feeds. | 18.30.37 |
|
||||
| `hide-channel-avatar-section` | Hides the channel avatar section of the subscription feed. | 18.30.37 |
|
||||
| `hide-channel-watermark` | Hides creator's watermarks on videos. | 18.30.37 |
|
||||
| `hide-collapse-button` | Hides the collapse button in the video player. | 18.30.37 |
|
||||
| `hide-comment-component` | Hides components related to comments. | 18.30.37 |
|
||||
| `hide-crowdfunding-box` | Hides the crowdfunding box between the player and video description. | 18.30.37 |
|
||||
| `hide-description-components` | Hides description components. | 18.30.37 |
|
||||
| `hide-double-tap-overlay-filter` | Hides the double tap dark filter layer. | 18.30.37 |
|
||||
| `hide-end-screen-cards` | Hides the suggested video cards at the end of a video in fullscreen. | 18.30.37 |
|
||||
| `hide-end-screen-overlay` | Hide end screen overlay on swipe controls. | 18.30.37 |
|
||||
| `hide-feed-flyout-panel` | Hides feed flyout panel components. | 18.30.37 |
|
||||
| `hide-filmstrip-overlay` | Hide filmstrip overlay on swipe controls. | 18.30.37 |
|
||||
| `hide-floating-microphone` | Hides the floating microphone button which appears in search. | 18.30.37 |
|
||||
| `hide-fullscreen-panels` | Hides video description and comments panel in fullscreen view. | 18.30.37 |
|
||||
| `hide-general-ads` | Hides general ads. | 18.30.37 |
|
||||
| `hide-handle` | Hides the handle in the account switcher. | 18.30.37 |
|
||||
| `hide-info-cards` | Hides info-cards in videos. | 18.30.37 |
|
||||
| `hide-latest-videos-button` | Hides latest videos button in home feed. | 18.30.37 |
|
||||
| `hide-layout-components` | Hides general layout components. | 18.30.37 |
|
||||
| `hide-load-more-button` | Hides the button under videos that loads similar videos. | 18.30.37 |
|
||||
| `hide-mix-playlists` | Hides mix playlists from home feed and video player. | 18.30.37 |
|
||||
| `hide-music-button` | Hides the YouTube Music button in the video player. | 18.30.37 |
|
||||
| `hide-navigation-buttons` | Adds options to hide or change navigation buttons. | 18.30.37 |
|
||||
| `hide-navigation-label` | Hide navigation bar labels. | 18.30.37 |
|
||||
| `hide-player-button-background` | Hide player button background. | 18.30.37 |
|
||||
| `hide-player-flyout-panel` | Hides player flyout panel components. | 18.30.37 |
|
||||
| `hide-player-overlay-filter` | Hides the dark filter layer from the player's background. | 18.30.37 |
|
||||
| `hide-previous-next-button` | Hides the previous and next button in the player controller. | 18.30.37 |
|
||||
| `hide-quick-actions` | Adds the options to hide quick actions components in the fullscreen. | 18.30.37 |
|
||||
| `hide-seek-message` | Hides the 'Slide left or right to seek' message container. | 18.30.37 |
|
||||
| `hide-seekbar` | Hides the seekbar in video player and video thumbnails. | 18.30.37 |
|
||||
| `hide-shorts-components` | Hides other Shorts components. | 18.30.37 |
|
||||
| `hide-snack-bar` | Hides the snack bar action popup. | 18.30.37 |
|
||||
| `hide-speed-overlay` | Hide speed overlay in player. | 18.30.37 |
|
||||
| `hide-suggested-actions` | Hide the suggested actions bar inside the player. | 18.30.37 |
|
||||
| `hide-suggested-video-overlay` | Hide the suggested video overlay to play next. | 18.30.37 |
|
||||
| `hide-suggestions-shelf` | Hides the suggestions shelf. | 18.30.37 |
|
||||
| `hide-time-stamp` | Hides timestamp in video player. | 18.30.37 |
|
||||
| `hide-tooltip-content` | Hides the tooltip box that appears on first install. | 18.30.37 |
|
||||
| `hide-trending-searches` | Hide trending searches in the search bar. | 18.30.37 |
|
||||
| `hide-video-ads` | Hides ads in the video player. | 18.30.37 |
|
||||
| `language-switch` | Add language switch toggle. | 18.30.37 |
|
||||
| `layout-switch` | Tricks the dpi to use some tablet/phone layouts. | 18.30.37 |
|
||||
| `materialyou` | Enables MaterialYou theme for Android 12+ | 18.30.37 |
|
||||
| `microg-support` | Allows ReVanced to run without root and under a different package name with MicroG. | 18.30.37 |
|
||||
| `optimize-resource` | Removes duplicate resources from YouTube. | 18.30.37 |
|
||||
| `overlay-buttons` | Add overlay buttons to the player. | 18.30.37 |
|
||||
| `return-youtube-dislike` | Shows the dislike count of videos using the Return YouTube Dislike API. | 18.30.37 |
|
||||
| `settings` | Applies mandatory patches to implement ReVanced settings into the application. | 18.30.37 |
|
||||
| `sponsorblock` | Integrates SponsorBlock which allows skipping video segments such as sponsored content. | 18.30.37 |
|
||||
| `spoof-app-version` | Tricks YouTube into thinking, you are running an older version of the app. One of the side effects also includes restoring the old UI. | 18.30.37 |
|
||||
| `spoof-player-parameters` | Spoofs player parameters to prevent playback issues. | 18.30.37 |
|
||||
| `swipe-controls` | Adds volume and brightness swipe controls. | 18.30.37 |
|
||||
| `theme` | Change the app's theme to the values specified in options.json. | 18.30.37 |
|
||||
| `translations` | Add Crowdin translations for YouTube. | 18.30.37 |
|
||||
| `custom-playback-speed` | Adds more playback speed options. | 18.20.39 ~ 18.30.37 |
|
||||
| `custom-seekbar-color` | Change seekbar color in video player and video thumbnails. | 18.20.39 ~ 18.30.37 |
|
||||
| `default-playback-speed` | Adds ability to set default playback speed settings. | 18.20.39 ~ 18.30.37 |
|
||||
| `default-video-quality` | Adds ability to set default video quality settings. | 18.20.39 ~ 18.30.37 |
|
||||
| `disable-quic-protocol` | Disable CronetEngine's QUIC protocol. | 18.20.39 ~ 18.30.37 |
|
||||
| `disable-shorts-on-startup` | Disables playing YouTube Shorts when launching YouTube. | 18.20.39 ~ 18.30.37 |
|
||||
| `disable-auto-captions` | Disables forced auto captions. | 18.20.39 ~ 18.30.37 |
|
||||
| `disable-haptic-feedback` | Disable haptic feedback when swiping. | 18.20.39 ~ 18.30.37 |
|
||||
| `disable-hdr-video` | Disable HDR video. | 18.20.39 ~ 18.30.37 |
|
||||
| `disable-landscape-mode` | Disable landscape mode when entering fullscreen. | 18.20.39 ~ 18.30.37 |
|
||||
| `disable-pip-notification` | Disable pip notification when you first launch pip mode. | 18.20.39 ~ 18.30.37 |
|
||||
| `enable-compact-controls-overlay` | Enables compact control overlay. | 18.20.39 ~ 18.30.37 |
|
||||
| `enable-debug-logging` | Adds debugging options. | 18.20.39 ~ 18.30.37 |
|
||||
| `enable-external-browser` | Open url outside the app in an external browser. | 18.20.39 ~ 18.30.37 |
|
||||
| `enable-minimized-playback` | Enables minimized and background playback. | 18.20.39 ~ 18.30.37 |
|
||||
| `enable-new-comment-popup-panels` | Enables a new type of comment popup panel in the shorts player. | 18.20.39 ~ 18.30.37 |
|
||||
| `enable-new-splash-animation` | Enables a new type of splash animation. | 18.20.39 ~ 18.30.37 |
|
||||
| `enable-new-thumbnail-preview` | Enables a new type of thumbnail preview. | 18.20.39 ~ 18.30.37 |
|
||||
| `enable-old-quality-layout` | Enables the original quality flyout menu. | 18.20.39 ~ 18.30.37 |
|
||||
| `enable-open-links-directly` | Skips over redirection URLs to external links. | 18.20.39 ~ 18.30.37 |
|
||||
| `enable-seekbar-tapping` | Enables tap-to-seek on the seekbar of the video player. | 18.20.39 ~ 18.30.37 |
|
||||
| `enable-tablet-mini-player` | Enables the tablet mini player layout. | 18.20.39 ~ 18.30.37 |
|
||||
| `enable-tablet-navigation-bar` | Enables the tablet navigation bar. | 18.20.39 ~ 18.30.37 |
|
||||
| `enable-time-stamps-speed` | Add the current playback speed in brackets next to the current time. | 18.20.39 ~ 18.30.37 |
|
||||
| `enable-wide-search-bar` | Replaces the search icon with a wide search bar. This will hide the YouTube logo when active. | 18.20.39 ~ 18.30.37 |
|
||||
| `force-opus-codec` | Forces the OPUS codec for audios. | 18.20.39 ~ 18.30.37 |
|
||||
| `force-vp9-codec` | Forces the VP9 codec for videos. | 18.20.39 ~ 18.30.37 |
|
||||
| `force-hide-player-button-background` | Force hides the background from the video player buttons. | 18.20.39 ~ 18.30.37 |
|
||||
| `force-premium-heading` | Forces premium heading on the homepage. | 18.20.39 ~ 18.30.37 |
|
||||
| `header-switch` | Add switch to change header. | 18.20.39 ~ 18.30.37 |
|
||||
| `hide-account-menu` | Hide account menu elements. | 18.20.39 ~ 18.30.37 |
|
||||
| `hide-auto-player-popup-panels` | Hide automatic popup panels (playlist or live chat) on video player. | 18.20.39 ~ 18.30.37 |
|
||||
| `hide-autoplay-button` | Hides the autoplay button in the video player. | 18.20.39 ~ 18.30.37 |
|
||||
| `hide-autoplay-preview` | Hides the autoplay preview container in the fullscreen. | 18.20.39 ~ 18.30.37 |
|
||||
| `hide-button-container` | Adds the options to hide action buttons under a video. | 18.20.39 ~ 18.30.37 |
|
||||
| `hide-captions-button` | Hides the captions button in the video player. | 18.20.39 ~ 18.30.37 |
|
||||
| `hide-cast-button` | Hides the cast button in the video player. | 18.20.39 ~ 18.30.37 |
|
||||
| `hide-category-bar` | Hides the category bar in video feeds. | 18.20.39 ~ 18.30.37 |
|
||||
| `hide-channel-avatar-section` | Hides the channel avatar section of the subscription feed. | 18.20.39 ~ 18.30.37 |
|
||||
| `hide-channel-watermark` | Hides creator's watermarks on videos. | 18.20.39 ~ 18.30.37 |
|
||||
| `hide-collapse-button` | Hides the collapse button in the video player. | 18.20.39 ~ 18.30.37 |
|
||||
| `hide-comment-component` | Hides components related to comments. | 18.20.39 ~ 18.30.37 |
|
||||
| `hide-crowdfunding-box` | Hides the crowdfunding box between the player and video description. | 18.20.39 ~ 18.30.37 |
|
||||
| `hide-description-components` | Hides description components. | 18.20.39 ~ 18.30.37 |
|
||||
| `hide-double-tap-overlay-filter` | Hides the double tap dark filter layer. | 18.20.39 ~ 18.30.37 |
|
||||
| `hide-end-screen-cards` | Hides the suggested video cards at the end of a video in fullscreen. | 18.20.39 ~ 18.30.37 |
|
||||
| `hide-end-screen-overlay` | Hide end screen overlay on swipe controls. | 18.20.39 ~ 18.30.37 |
|
||||
| `hide-feed-flyout-panel` | Hides feed flyout panel components. | 18.20.39 ~ 18.30.37 |
|
||||
| `hide-filmstrip-overlay` | Hide filmstrip overlay on swipe controls. | 18.20.39 ~ 18.30.37 |
|
||||
| `hide-floating-microphone` | Hides the floating microphone button which appears in search. | 18.20.39 ~ 18.30.37 |
|
||||
| `hide-fullscreen-panels` | Hides video description and comments panel in fullscreen view. | 18.20.39 ~ 18.30.37 |
|
||||
| `hide-general-ads` | Hides general ads. | 18.20.39 ~ 18.30.37 |
|
||||
| `hide-handle` | Hides the handle in the account switcher. | 18.20.39 ~ 18.30.37 |
|
||||
| `hide-info-cards` | Hides info-cards in videos. | 18.20.39 ~ 18.30.37 |
|
||||
| `hide-latest-videos-button` | Hides latest videos button in home feed. | 18.20.39 ~ 18.30.37 |
|
||||
| `hide-layout-components` | Hides general layout components. | 18.20.39 ~ 18.30.37 |
|
||||
| `hide-load-more-button` | Hides the button under videos that loads similar videos. | 18.20.39 ~ 18.30.37 |
|
||||
| `hide-mix-playlists` | Hides mix playlists from home feed and video player. | 18.20.39 ~ 18.30.37 |
|
||||
| `hide-music-button` | Hides the YouTube Music button in the video player. | 18.20.39 ~ 18.30.37 |
|
||||
| `hide-navigation-buttons` | Adds options to hide or change navigation buttons. | 18.20.39 ~ 18.30.37 |
|
||||
| `hide-navigation-label` | Hide navigation bar labels. | 18.20.39 ~ 18.30.37 |
|
||||
| `hide-player-button-background` | Hide player button background. | 18.20.39 ~ 18.30.37 |
|
||||
| `hide-player-flyout-panel` | Hides player flyout panel components. | 18.20.39 ~ 18.30.37 |
|
||||
| `hide-player-overlay-filter` | Hides the dark filter layer from the player's background. | 18.20.39 ~ 18.30.37 |
|
||||
| `hide-previous-next-button` | Hides the previous and next button in the player controller. | 18.20.39 ~ 18.30.37 |
|
||||
| `hide-quick-actions` | Adds the options to hide quick actions components in the fullscreen. | 18.20.39 ~ 18.30.37 |
|
||||
| `hide-seek-message` | Hides the 'Slide left or right to seek' message container. | 18.20.39 ~ 18.30.37 |
|
||||
| `hide-seekbar` | Hides the seekbar in video player and video thumbnails. | 18.20.39 ~ 18.30.37 |
|
||||
| `hide-shorts-components` | Hides other Shorts components. | 18.20.39 ~ 18.30.37 |
|
||||
| `hide-snack-bar` | Hides the snack bar action popup. | 18.20.39 ~ 18.30.37 |
|
||||
| `hide-speed-overlay` | Hide speed overlay in player. | 18.20.39 ~ 18.30.37 |
|
||||
| `hide-suggested-actions` | Hide the suggested actions bar inside the player. | 18.20.39 ~ 18.30.37 |
|
||||
| `hide-suggested-video-overlay` | Hide the suggested video overlay to play next. | 18.20.39 ~ 18.30.37 |
|
||||
| `hide-suggestions-shelf` | Hides the suggestions shelf. | 18.20.39 ~ 18.30.37 |
|
||||
| `hide-time-stamp` | Hides timestamp in video player. | 18.20.39 ~ 18.30.37 |
|
||||
| `hide-tooltip-content` | Hides the tooltip box that appears on first install. | 18.20.39 ~ 18.30.37 |
|
||||
| `hide-trending-searches` | Hide trending searches in the search bar. | 18.20.39 ~ 18.30.37 |
|
||||
| `hide-video-ads` | Hides ads in the video player. | 18.20.39 ~ 18.30.37 |
|
||||
| `language-switch` | Add language switch toggle. | 18.20.39 ~ 18.30.37 |
|
||||
| `layout-switch` | Tricks the dpi to use some tablet/phone layouts. | 18.20.39 ~ 18.30.37 |
|
||||
| `materialyou` | Enables MaterialYou theme for Android 12+ | 18.20.39 ~ 18.30.37 |
|
||||
| `microg-support` | Allows ReVanced to run without root and under a different package name with MicroG. | 18.20.39 ~ 18.30.37 |
|
||||
| `optimize-resource` | Removes duplicate resources from YouTube. | 18.20.39 ~ 18.30.37 |
|
||||
| `overlay-buttons` | Add overlay buttons to the player. | 18.20.39 ~ 18.30.37 |
|
||||
| `return-youtube-dislike` | Shows the dislike count of videos using the Return YouTube Dislike API. | 18.20.39 ~ 18.30.37 |
|
||||
| `settings` | Applies mandatory patches to implement ReVanced settings into the application. | 18.20.39 ~ 18.30.37 |
|
||||
| `sponsorblock` | Integrates SponsorBlock which allows skipping video segments such as sponsored content. | 18.20.39 ~ 18.30.37 |
|
||||
| `spoof-app-version` | Tricks YouTube into thinking, you are running an older version of the app. One of the side effects also includes restoring the old UI. | 18.20.39 ~ 18.30.37 |
|
||||
| `spoof-player-parameters` | Spoofs player parameters to prevent playback issues. | 18.20.39 ~ 18.30.37 |
|
||||
| `swipe-controls` | Adds volume and brightness swipe controls. | 18.20.39 ~ 18.30.37 |
|
||||
| `theme` | Change the app's theme to the values specified in options.json. | 18.20.39 ~ 18.30.37 |
|
||||
| `translations` | Add Crowdin translations for YouTube. | 18.20.39 ~ 18.30.37 |
|
||||
</details>
|
||||
|
||||
### [📦 `com.google.android.apps.youtube.music`](https://play.google.com/store/apps/details?id=com.google.android.apps.youtube.music)
|
||||
@ -192,7 +192,6 @@ Example:
|
||||
{
|
||||
"name": "default-video-quality",
|
||||
"description": "Adds ability to set default video quality settings.",
|
||||
"version": "0.0.1",
|
||||
"excluded": false,
|
||||
"options": [],
|
||||
"dependencies": [
|
||||
|
@ -30,15 +30,23 @@ internal class ReadmeGenerator : PatchesFileGenerator {
|
||||
.entries
|
||||
.sortedByDescending { it.value.size }
|
||||
.forEach { (`package`, patches) ->
|
||||
val mostCommonVersion = buildMap {
|
||||
val supportVersions = buildMap {
|
||||
patches.forEach { patch ->
|
||||
patch.compatiblePackages?.single { compatiblePackage -> compatiblePackage.name == `package` }?.versions?.let {
|
||||
it.forEach { version -> merge(version, 1, Integer::sum) }
|
||||
}
|
||||
}
|
||||
}.let { commonMap ->
|
||||
}
|
||||
|
||||
val minVersion = supportVersions.let { commonMap ->
|
||||
commonMap.maxByOrNull { it.value }?.value?.let {
|
||||
commonMap.entries.filter { mostCommon -> mostCommon.value == it }
|
||||
commonMap.entries.filter { supported -> supported.value == it }
|
||||
.minOfWith(FlexVerComparator::compare, Map.Entry<String, Int>::key)
|
||||
} ?: "all"
|
||||
}
|
||||
val maxVersion = supportVersions.let { commonMap ->
|
||||
commonMap.maxByOrNull { it.value }?.value?.let {
|
||||
commonMap.entries.filter { supported -> supported.value == it }
|
||||
.maxOfWith(FlexVerComparator::compare, Map.Entry<String, Int>::key)
|
||||
} ?: "all"
|
||||
}
|
||||
@ -48,14 +56,21 @@ internal class ReadmeGenerator : PatchesFileGenerator {
|
||||
appendLine("<details>\n")
|
||||
appendLine(TABLE_HEADER)
|
||||
patches.forEach { patch ->
|
||||
val recommendedPatchVersion = if (
|
||||
patch.compatiblePackages?.single { it.name == `package` }?.versions?.isNotEmpty() == true
|
||||
) mostCommonVersion else "all"
|
||||
val supportedVersion =
|
||||
if (
|
||||
patch.compatiblePackages?.single { it.name == `package` }?.versions?.isNotEmpty() == true
|
||||
) {
|
||||
if (minVersion == maxVersion)
|
||||
maxVersion
|
||||
else
|
||||
"$minVersion ~ $maxVersion"
|
||||
} else
|
||||
"all"
|
||||
|
||||
appendLine(
|
||||
"| `${patch.patchName.lowercase().replace(" ", "-")}` " +
|
||||
"| ${patch.description} " +
|
||||
"| $recommendedPatchVersion |"
|
||||
"| $supportedVersion |"
|
||||
)
|
||||
}
|
||||
appendLine("</details>\n")
|
||||
|
Loading…
x
Reference in New Issue
Block a user