mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2026-01-16 15:53:58 +00:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6c4a69fcfb | ||
|
|
4129fcf8a8 | ||
|
|
b39d60f46c | ||
|
|
8ce3a6b4e3 | ||
|
|
7107ee87d9 | ||
|
|
7ea5d87fa2 | ||
|
|
471a3d3263 | ||
|
|
b95fe30c78 |
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@@ -33,7 +33,7 @@ jobs:
|
||||
- name: Build with Gradle
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: ./gradlew build clean
|
||||
run: ./gradlew build clean generateReadme
|
||||
- name: Install Android build-tools
|
||||
run: sdkmanager "build-tools;32.0.0"
|
||||
- name: Setup semantic-release
|
||||
|
||||
11
CHANGELOG.md
11
CHANGELOG.md
@@ -1,3 +1,14 @@
|
||||
## [2.12.2](https://github.com/revanced/revanced-patches/compare/v2.12.1...v2.12.2) (2022-07-10)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* display codename for patch names ([10c53f7](https://github.com/revanced/revanced-patches/commit/10c53f720df3e70b9d59e8bc3219d56b996f03db))
|
||||
* incorrect package name in gradle task ([152b2c9](https://github.com/revanced/revanced-patches/commit/152b2c90cf102170648fcc168da10f46743bdc63))
|
||||
* invalid regex ([26bf1d8](https://github.com/revanced/revanced-patches/commit/26bf1d818f953abc061126d8b91f17cd9008ba1d))
|
||||
|
||||
## [2.12.1](https://github.com/revanced/revanced-patches/compare/v2.12.0...v2.12.1) (2022-07-10)
|
||||
|
||||
# [2.12.0](https://github.com/revanced/revanced-patches/compare/v2.11.0...v2.12.0) (2022-07-10)
|
||||
|
||||
|
||||
|
||||
9
README-template.md
Normal file
9
README-template.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# ReVanced Patches
|
||||
|
||||
🧩 Official patches by ReVanced
|
||||
|
||||
# List of available patches
|
||||
|
||||
| 💊 Patch | 📜 Description | 🎯 Target Package | 🏹 Target Version |
|
||||
|:--------:|:--------------:|:-----------------:|:-----------------:|
|
||||
{{ table }}
|
||||
34
README.md
34
README.md
@@ -1,2 +1,36 @@
|
||||
# ReVanced Patches
|
||||
|
||||
🧩 Official patches by ReVanced
|
||||
|
||||
# List of available patches
|
||||
|
||||
| 💊 Patch | 📜 Description | 🎯 Target Package | 🏹 Target Version |
|
||||
|:--------:|:--------------:|:-----------------:|:-----------------:|
|
||||
| `fenster-swipe-controls` | Adds volume and brightness swipe controls. | `com.google.android.youtube` | 17.26.35 |
|
||||
| `seekbar-tapping` | Enables tapping on the seekbar of the YouTube player. | `com.google.android.youtube` | 17.26.35 |
|
||||
| `general-ads` | Removes general ads in bytecode. | `com.google.android.youtube` | 17.26.35 |
|
||||
| `video-ads` | Removes ads in the YouTube video player. | `com.google.android.youtube` | 17.26.35 |
|
||||
| `hide-infocard-suggestions` | Hides infocards in videos. | `com.google.android.youtube` | 17.26.35 |
|
||||
| `autorepeat-by-default` | Enables auto repeating of videos by default. | `com.google.android.youtube` | 17.26.35 |
|
||||
| `custom-branding` | Changes the branding of YouTube. | `com.google.android.youtube` | all |
|
||||
| `premium-heading` | Shows premium branding on the YouTube home screen. | `com.google.android.youtube` | all |
|
||||
| `minimized-playback` | Enables minimized and background playback. | `com.google.android.youtube` | 17.26.35 |
|
||||
| `enable-wide-searchbar` | Replaces the search icon with a wide search bar. This will hide the YouTube logo when active. | `com.google.android.youtube` | 17.26.35 |
|
||||
| `disable-fullscreen-panels` | Disables comments panel in fullscreen view. | `com.google.android.youtube` | 17.26.35 |
|
||||
| `old-quality-layout` | Enables the original quality flyout menu. | `com.google.android.youtube` | 17.26.35 |
|
||||
| `hide-autoplay-button` | Disables the autoplay button. | `com.google.android.youtube` | 17.26.35 |
|
||||
| `disable-create-button` | Disables the create button. | `com.google.android.youtube` | 17.26.35 |
|
||||
| `amoled` | Enables pure black theme. | `com.google.android.youtube` | 17.26.35 |
|
||||
| `hide-shorts-button` | Hides the shorts button. | `com.google.android.youtube` | 17.26.35 |
|
||||
| `hide-cast-button` | Hides the cast button. | `com.google.android.youtube` | all |
|
||||
| `hide-watermark` | Hides the creator's watermark on videos. | `com.google.android.youtube` | 17.26.35 |
|
||||
| `microg-support` | Allows YouTube ReVanced to run without root and under a different package name. | `com.google.android.youtube` | 17.26.35 |
|
||||
| `custom-playback-speed` | Allows to change the default playback speed options. | `com.google.android.youtube` | 17.26.35 |
|
||||
| `hdr-max-brightness` | Sets brightness to max for HDR videos in fullscreen mode. | `com.google.android.youtube` | 17.26.35 |
|
||||
| `enable-debugging` | Enables app debugging by patching the manifest file. | `com.google.android.youtube` | all |
|
||||
| `background-play` | Enables playing music in the background. | `com.google.android.apps.youtube.music` | 5.03.50 |
|
||||
| `exclusive-audio-playback` | Adds the option to play music without video. | `com.google.android.apps.youtube.music` | 5.03.50 |
|
||||
| `codecs-unlock` | Enables more audio codecs. Usually results in better audio quality but may depend on song and device. | `com.google.android.apps.youtube.music` | 5.03.50 |
|
||||
| `upgrade-button-remover` | Removes the upgrade tab from the pivot bar in YouTube music. | `com.google.android.apps.youtube.music` | 5.03.50 |
|
||||
| `tasteBuilder-remover` | Removes the "Tell us which artists you like" card from the Home screen. The same functionality can be triggered from the settings anyway. | `com.google.android.apps.youtube.music` | 5.03.50 |
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ tasks {
|
||||
dependsOn(build)
|
||||
|
||||
classpath = sourceSets["main"].runtimeClasspath
|
||||
mainClass.set("app.revanced.patches.meta.ReadmeGenerator")
|
||||
mainClass.set("app.revanced.meta.readme.Generator")
|
||||
}
|
||||
// Dummy task to fix the Gradle semantic-release plugin.
|
||||
// Remove this if you forked it to support building only.
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
kotlin.code.style = official
|
||||
version = 2.12.0
|
||||
version = 2.12.2
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
package app.revanced.patches.meta
|
||||
|
||||
import java.io.File
|
||||
import kotlin.io.writeText
|
||||
import kotlin.collections.first
|
||||
import app.revanced.patcher.util.patch.implementation.JarPatchBundle
|
||||
import app.revanced.patcher.extensions.PatchExtensions.compatiblePackages
|
||||
import app.revanced.patcher.extensions.PatchExtensions.patchName
|
||||
import app.revanced.patcher.extensions.PatchExtensions.description
|
||||
|
||||
class ReadmeGenerator {
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun main(args: Array<String>) {
|
||||
//should be moved to a file?
|
||||
val generalReadme =
|
||||
"""
|
||||
# ReVanced Patches
|
||||
🧩 Official patches by ReVanced
|
||||
|
||||
# Patch list
|
||||
""".trimIndent()
|
||||
|
||||
val tableHeader =
|
||||
"""
|
||||
| 💊 Patch | 📜 Description | 🎯 Target Package | 🏹 Target Version |
|
||||
|:-----:|:-----------:|:--------------:|:----------------------:|
|
||||
""".trimIndent()
|
||||
|
||||
val readmeFile = File("README.md")
|
||||
|
||||
val buildDir = File("build/libs/")
|
||||
val buildJar = buildDir.listFiles().first { it.name.startsWith("revanced-patches-") && it.name.endsWith(".jar") }
|
||||
|
||||
val bundle = JarPatchBundle(buildJar.absolutePath).loadPatches()
|
||||
|
||||
val builder = StringBuilder()
|
||||
|
||||
builder.appendLine(generalReadme)
|
||||
builder.appendLine(tableHeader)
|
||||
|
||||
for (patch in bundle) {
|
||||
val humanName =
|
||||
patch.patchName.split('-').map { it.replaceFirstChar { it.uppercase() } }.joinToString(" ")
|
||||
|
||||
val compatiblePackage = patch.compatiblePackages?.first()
|
||||
val latestVersion = compatiblePackage?.versions?.maxByOrNull { it.replace(".", "").toInt() } ?: "all"
|
||||
|
||||
builder.appendLine("|$humanName|${patch.description}|`${compatiblePackage?.name}`|$latestVersion|")
|
||||
}
|
||||
|
||||
readmeFile.writeText(builder.toString())
|
||||
}
|
||||
}
|
||||
}
|
||||
38
src/main/kotlin/app/revanced/meta/readme/Generator.kt
Normal file
38
src/main/kotlin/app/revanced/meta/readme/Generator.kt
Normal file
@@ -0,0 +1,38 @@
|
||||
package app.revanced.meta.readme
|
||||
|
||||
import app.revanced.patcher.extensions.PatchExtensions.compatiblePackages
|
||||
import app.revanced.patcher.extensions.PatchExtensions.description
|
||||
import app.revanced.patcher.extensions.PatchExtensions.patchName
|
||||
import app.revanced.patcher.util.patch.implementation.JarPatchBundle
|
||||
import java.io.File
|
||||
|
||||
class Generator {
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun main(args: Array<String>) {
|
||||
val buildDir = File("build/libs/")
|
||||
val buildJar =
|
||||
buildDir.listFiles()?.first { it.name.startsWith("revanced-patches-") && it.name.endsWith(".jar") }!!
|
||||
|
||||
val bundle = JarPatchBundle(buildJar.absolutePath).loadPatches()
|
||||
|
||||
val patches = StringBuilder()
|
||||
|
||||
for (patch in bundle) {
|
||||
val patchName = patch.patchName
|
||||
val compatiblePackage = patch.compatiblePackages?.first()
|
||||
val latestVersion = compatiblePackage?.versions?.maxByOrNull { it.replace(".", "").toInt() } ?: "all"
|
||||
|
||||
patches.appendLine("| `$patchName` | ${patch.description} | `${compatiblePackage?.name}` | $latestVersion |")
|
||||
}
|
||||
|
||||
val readMeTemplateFile = File("README-template.md")
|
||||
val readmeTemplate = Template(readMeTemplateFile.readText())
|
||||
|
||||
readmeTemplate.replaceVariable("table", patches.toString())
|
||||
|
||||
val readme = File("README.md")
|
||||
readme.writeText(readmeTemplate.toString())
|
||||
}
|
||||
}
|
||||
}
|
||||
14
src/main/kotlin/app/revanced/meta/readme/Template.kt
Normal file
14
src/main/kotlin/app/revanced/meta/readme/Template.kt
Normal file
@@ -0,0 +1,14 @@
|
||||
package app.revanced.meta.readme
|
||||
|
||||
class Template(template: String) {
|
||||
val result: StringBuilder = StringBuilder(template)
|
||||
|
||||
fun replaceVariable(name: String, value: String) {
|
||||
val regex = Regex("\\{\\{\\s?$name\\s?}}")
|
||||
val range = regex.find(result)!!.range
|
||||
|
||||
result.replace(range.first, range.last + 1, value)
|
||||
}
|
||||
|
||||
override fun toString(): String = result.toString()
|
||||
}
|
||||
Reference in New Issue
Block a user