feat: debugging option

This commit is contained in:
oSumAtrIX 2022-06-05 07:56:27 +02:00
parent 4758289d68
commit 1b645c67db
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4
2 changed files with 4 additions and 1 deletions

View File

@ -52,6 +52,9 @@ internal object MainCommand : Runnable {
@Option(names = ["-d", "--deploy-on"], description = ["If specified, deploy to adb device with given name"])
internal var deploy: String? = null
@Option(names = ["-b", "--debugging"], description = ["Disable patch version compatibility"])
internal var debugging: Boolean = false
override fun run() {
if (listOnly) {
for (patchBundlePath in patchBundles) for (it in JarPatchBundle(patchBundlePath).loadPatches()) {

View File

@ -34,7 +34,7 @@ fun Patcher.addPatchesFiltered(
return@patch
}
if (!compatiblePackage.versions.any { it == packageVersion }) {
if (!(MainCommand.debugging || compatiblePackage.versions.any { it == packageVersion })) {
println("$prefix: Unsupported version.")
return@patch
}