You've already forked revanced-patcher
mirror of
https://github.com/revanced/revanced-patcher
synced 2025-09-06 16:38:50 +02:00
Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
639ff1c0ba | ||
![]() |
f30671ddd1 | ||
![]() |
76c45dd7c1 |
@@ -1,3 +1,10 @@
|
||||
## [4.2.1](https://github.com/revanced/revanced-patcher/compare/v4.2.0...v4.2.1) (2022-09-08)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* make patcher version public ([76c45dd](https://github.com/revanced/revanced-patcher/commit/76c45dd7c1ffdca57e30ae7109c9fe0e5768f877))
|
||||
|
||||
# [4.2.0](https://github.com/revanced/revanced-patcher/compare/v4.1.5...v4.2.0) (2022-09-08)
|
||||
|
||||
|
||||
|
@@ -1,2 +1,2 @@
|
||||
kotlin.code.style = official
|
||||
version = 4.2.0
|
||||
version = 4.2.1
|
||||
|
@@ -39,7 +39,6 @@ import java.io.File
|
||||
import java.nio.file.Files
|
||||
|
||||
private val NAMER = BasicDexFileNamer()
|
||||
private val VERSION = VersionReader.read()
|
||||
|
||||
/**
|
||||
* The ReVanced Patcher.
|
||||
@@ -51,6 +50,11 @@ class Patcher(private val options: PatcherOptions) {
|
||||
|
||||
val data: PatcherData
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
val version = VersionReader.read()
|
||||
}
|
||||
|
||||
init {
|
||||
val extInputFile = ExtFile(options.inputFile)
|
||||
try {
|
||||
@@ -249,9 +253,9 @@ class Patcher(private val options: PatcherOptions) {
|
||||
fun addPatches(patches: Iterable<Class<out Patch<Data>>>) {
|
||||
for (patch in patches) {
|
||||
val needsVersion = patch.sincePatcherVersion
|
||||
if (needsVersion != null && needsVersion > VERSION) {
|
||||
if (needsVersion != null && needsVersion > version) {
|
||||
logger.error("Patch '${patch.patchName}' requires Patcher version $needsVersion or higher")
|
||||
logger.error("Current Patcher version is $VERSION")
|
||||
logger.error("Current Patcher version is $version")
|
||||
logger.warn("Skipping '${patch.patchName}'!")
|
||||
continue // TODO: continue or halt/throw?
|
||||
}
|
||||
|
Reference in New Issue
Block a user