mirror of
https://github.com/ReVanced/revanced-cli.git
synced 2026-01-11 22:06:20 +00:00
Compare commits
8 Commits
v1.1.6-dev
...
v1.2.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bd3773798d | ||
|
|
8665661ed7 | ||
|
|
1c5e5e249d | ||
|
|
1b645c67db | ||
|
|
4758289d68 | ||
|
|
87c0e05d9c | ||
|
|
54c0a03d44 | ||
|
|
d6f2609cfa |
27
CHANGELOG.md
27
CHANGELOG.md
@@ -1,3 +1,30 @@
|
||||
# [1.2.0](https://github.com/revanced/revanced-cli/compare/v1.1.5...v1.2.0) (2022-06-05)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* migrate to latest patcher api changes ([ace70e4](https://github.com/revanced/revanced-cli/commit/ace70e417fdf280c7630a5a89a773879fd240e96))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add path for `cacheDirectory` and enable resource patching by default ([54c0a03](https://github.com/revanced/revanced-cli/commit/54c0a03d44c8d1b586bc487ee1ca71859d6f0b57))
|
||||
* debugging option ([1b645c6](https://github.com/revanced/revanced-cli/commit/1b645c67db58eb4d49b5290fd247507c9b43a9c6))
|
||||
|
||||
# [1.2.0-dev.2](https://github.com/revanced/revanced-cli/compare/v1.2.0-dev.1...v1.2.0-dev.2) (2022-06-05)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* debugging option ([1b645c6](https://github.com/revanced/revanced-cli/commit/1b645c67db58eb4d49b5290fd247507c9b43a9c6))
|
||||
|
||||
# [1.2.0-dev.1](https://github.com/revanced/revanced-cli/compare/v1.1.6-dev.1...v1.2.0-dev.1) (2022-06-04)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add path for `cacheDirectory` and enable resource patching by default ([54c0a03](https://github.com/revanced/revanced-cli/commit/54c0a03d44c8d1b586bc487ee1ca71859d6f0b57))
|
||||
|
||||
## [1.1.6-dev.1](https://github.com/revanced/revanced-cli/compare/v1.1.5...v1.1.6-dev.1) (2022-05-31)
|
||||
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ repositories {
|
||||
|
||||
dependencies {
|
||||
implementation("org.jetbrains.kotlin:kotlin-stdlib:1.6.21")
|
||||
implementation("app.revanced:revanced-patcher:1.0.0-dev.17")
|
||||
implementation("app.revanced:revanced-patcher:1.0.0-dev.18")
|
||||
|
||||
implementation("info.picocli:picocli:4.6.3")
|
||||
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
kotlin.code.style = official
|
||||
version = 1.1.6-dev.1
|
||||
version = 1.2.0
|
||||
|
||||
@@ -22,11 +22,11 @@ internal object MainCommand : Runnable {
|
||||
@Option(names = ["-p", "--patches"], description = ["One or more bundles of patches"])
|
||||
internal var patchBundles = arrayOf<String>()
|
||||
|
||||
@Option(names = ["-t", "--temp-dir"], description = ["Temporal resource cache directory"], required = true)
|
||||
internal lateinit var cacheDirectory: String
|
||||
@Option(names = ["-t", "--temp-dir"], description = ["Temporal resource cache directory"])
|
||||
internal var cacheDirectory = "revanced-cache"
|
||||
|
||||
@Option(names = ["-r", "--resource-patcher"], description = ["Enable patching resources"])
|
||||
internal var patchResources: Boolean = false
|
||||
@Option(names = ["-r", "--resource-patcher"], description = ["Disable patching resources"])
|
||||
internal var disableResourcePatching: Boolean = false
|
||||
|
||||
@Option(
|
||||
names = ["-c", "--clean"],
|
||||
@@ -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()) {
|
||||
@@ -65,7 +68,7 @@ internal object MainCommand : Runnable {
|
||||
return
|
||||
}
|
||||
|
||||
val patcher = app.revanced.patcher.Patcher(PatcherOptions(inputFile, cacheDirectory, patchResources))
|
||||
val patcher = app.revanced.patcher.Patcher(PatcherOptions(inputFile, cacheDirectory, !disableResourcePatching))
|
||||
|
||||
if (signatureCheck) {
|
||||
patcher.addPatchesFiltered()
|
||||
|
||||
@@ -30,7 +30,7 @@ internal class Patcher {
|
||||
zipFileSystem.replaceFile(name, data.data)
|
||||
}
|
||||
|
||||
if (MainCommand.patchResources) {
|
||||
if (!MainCommand.disableResourcePatching) {
|
||||
for (file in File(MainCommand.cacheDirectory).resolve("build/").listFiles(FileFilter { it.isDirectory })
|
||||
?.first()?.listFiles()!!) {
|
||||
if (!file.isDirectory) {
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user