fix(Change version code): Remove patch option changeVersionCode, which is no longer needed

This commit is contained in:
inotia00 2024-12-21 11:33:29 +09:00
parent e611321c9f
commit 370d85adad

View File

@ -1,7 +1,6 @@
package app.revanced.patches.all.misc.versioncode package app.revanced.patches.all.misc.versioncode
import app.revanced.patcher.patch.PatchException import app.revanced.patcher.patch.PatchException
import app.revanced.patcher.patch.booleanOption
import app.revanced.patcher.patch.resourcePatch import app.revanced.patcher.patch.resourcePatch
import app.revanced.patcher.patch.stringOption import app.revanced.patcher.patch.stringOption
import app.revanced.util.getNode import app.revanced.util.getNode
@ -19,14 +18,6 @@ val changeVersionCodePatch = resourcePatch(
"By default, the highest version code is set.", "By default, the highest version code is set.",
use = false, use = false,
) { ) {
val changeVersionCode by booleanOption(
key = "changeVersionCode",
default = false,
title = "Change version code",
description = "Changes the version code of the app.",
required = true
)
val versionCodeOption = stringOption( val versionCodeOption = stringOption(
key = "versionCode", key = "versionCode",
default = MAX_VALUE, default = MAX_VALUE,
@ -40,10 +31,6 @@ val changeVersionCodePatch = resourcePatch(
) )
execute { execute {
if (changeVersionCode == false) {
println("INFO: Version code will remain unchanged as 'ChangeVersionCode' is false.")
return@execute
}
fun throwVersionCodeException(versionCodeString: String): PatchException = fun throwVersionCodeException(versionCodeString: String): PatchException =
PatchException( PatchException(
"Invalid versionCode: $versionCodeString, " + "Invalid versionCode: $versionCodeString, " +