feat: use new patch naming convention

This commit is contained in:
oSumAtrIX 2023-07-10 18:49:40 +02:00
parent 9c148c96bf
commit f6c221d72d
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4
3 changed files with 4 additions and 5 deletions

View File

@ -35,7 +35,7 @@ Learn how to ReVanced CLI.
```bash ```bash
java -jar revanced-cli.jar java -jar revanced-cli.jar
-b revanced-patches.jar \ -b revanced-patches.jar \
-l -l # Names of all patches will be in kebab-case
``` ```
- ### 💉 Use ReVanced CLI to patch an APK file but deploy without root permissions - ### 💉 Use ReVanced CLI to patch an APK file but deploy without root permissions

View File

@ -241,7 +241,7 @@ internal object MainCommand : Runnable {
} }
// Add patch name // Add patch name
val patchName = patch.patchName.padStart(25) val patchName = patch.patchName.lowercase().replace(" ", "-").padStart(25)
append(patchName) append(patchName)
// Add description if flag is set. // Add description if flag is set.

View File

@ -1,6 +1,5 @@
package app.revanced.utils.patcher package app.revanced.utils.patcher
import app.revanced.cli.command.MainCommand
import app.revanced.cli.command.MainCommand.args import app.revanced.cli.command.MainCommand.args
import app.revanced.cli.command.MainCommand.logger import app.revanced.cli.command.MainCommand.logger
import app.revanced.cli.command.PatchList import app.revanced.cli.command.PatchList
@ -18,8 +17,8 @@ fun Patcher.addPatchesFiltered(allPatches: PatchList) {
val includedPatches = mutableListOf<Class<out Patch<Context>>>() val includedPatches = mutableListOf<Class<out Patch<Context>>>()
allPatches.forEach patchLoop@{ patch -> allPatches.forEach patchLoop@{ patch ->
val compatiblePackages = patch.compatiblePackages val compatiblePackages = patch.compatiblePackages
val patchName = patch.patchName val patchName = patch.patchName.lowercase().replace(" ", "-")
val args = MainCommand.args.patchArgs?.patchingArgs!! val args = args.patchArgs?.patchingArgs!!
val prefix = "Skipping $patchName" val prefix = "Skipping $patchName"