mirror of
https://github.com/ReVanced/revanced-patcher.git
synced 2026-01-23 11:11:04 +00: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)
|
# [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
|
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
|
import java.nio.file.Files
|
||||||
|
|
||||||
private val NAMER = BasicDexFileNamer()
|
private val NAMER = BasicDexFileNamer()
|
||||||
private val VERSION = VersionReader.read()
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The ReVanced Patcher.
|
* The ReVanced Patcher.
|
||||||
@@ -51,6 +50,11 @@ class Patcher(private val options: PatcherOptions) {
|
|||||||
|
|
||||||
val data: PatcherData
|
val data: PatcherData
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
@JvmStatic
|
||||||
|
val version = VersionReader.read()
|
||||||
|
}
|
||||||
|
|
||||||
init {
|
init {
|
||||||
val extInputFile = ExtFile(options.inputFile)
|
val extInputFile = ExtFile(options.inputFile)
|
||||||
try {
|
try {
|
||||||
@@ -249,9 +253,9 @@ class Patcher(private val options: PatcherOptions) {
|
|||||||
fun addPatches(patches: Iterable<Class<out Patch<Data>>>) {
|
fun addPatches(patches: Iterable<Class<out Patch<Data>>>) {
|
||||||
for (patch in patches) {
|
for (patch in patches) {
|
||||||
val needsVersion = patch.sincePatcherVersion
|
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("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}'!")
|
logger.warn("Skipping '${patch.patchName}'!")
|
||||||
continue // TODO: continue or halt/throw?
|
continue // TODO: continue or halt/throw?
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user