mirror of
https://github.com/ReVanced/revanced-cli.git
synced 2026-01-18 00:43:58 +00:00
Compare commits
4 Commits
v4.0.3-dev
...
v4.1.0-dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4fc42089a5 | ||
|
|
0139dfe0bf | ||
|
|
7d1c0e663f | ||
|
|
6cc6960493 |
@@ -1,3 +1,12 @@
|
|||||||
|
# [4.1.0-dev.1](https://github.com/ReVanced/revanced-cli/compare/v4.0.3-dev.2...v4.1.0-dev.1) (2023-11-03)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* List patches which are compatible with any app ([#297](https://github.com/ReVanced/revanced-cli/issues/297)) ([0139dfe](https://github.com/ReVanced/revanced-cli/commit/0139dfe0bfa06a13f56dc03e7718aaf644029614))
|
||||||
|
|
||||||
|
## [4.0.3-dev.2](https://github.com/ReVanced/revanced-cli/compare/v4.0.3-dev.1...v4.0.3-dev.2) (2023-10-30)
|
||||||
|
|
||||||
## [4.0.3-dev.1](https://github.com/ReVanced/revanced-cli/compare/v4.0.2...v4.0.3-dev.1) (2023-10-23)
|
## [4.0.3-dev.1](https://github.com/ReVanced/revanced-cli/compare/v4.0.2...v4.0.3-dev.1) (2023-10-23)
|
||||||
|
|
||||||
## [4.0.2](https://github.com/ReVanced/revanced-cli/compare/v4.0.1...v4.0.2) (2023-10-12)
|
## [4.0.2](https://github.com/ReVanced/revanced-cli/compare/v4.0.1...v4.0.2) (2023-10-12)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
org.gradle.parallel = true
|
org.gradle.parallel = true
|
||||||
org.gradle.caching = true
|
org.gradle.caching = true
|
||||||
kotlin.code.style = official
|
kotlin.code.style = official
|
||||||
version = 4.0.3-dev.1
|
version = 4.1.0-dev.1
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ shadow = "8.1.1"
|
|||||||
kotlin-test = "1.8.20-RC"
|
kotlin-test = "1.8.20-RC"
|
||||||
kotlinx-coroutines-core = "1.7.3"
|
kotlinx-coroutines-core = "1.7.3"
|
||||||
picocli = "4.7.3"
|
picocli = "4.7.3"
|
||||||
revanced-patcher = "18.0.0"
|
revanced-patcher = "19.0.0"
|
||||||
revanced-library = "1.1.5"
|
revanced-library = "1.1.5"
|
||||||
|
|
||||||
[libraries]
|
[libraries]
|
||||||
|
|||||||
@@ -42,6 +42,13 @@ internal object ListPatchesCommand : Runnable {
|
|||||||
)
|
)
|
||||||
private var withOptions: Boolean = false
|
private var withOptions: Boolean = false
|
||||||
|
|
||||||
|
@Option(
|
||||||
|
names = ["-u", "--with-universal-patches"],
|
||||||
|
description = ["List patches which are compatible with any app."],
|
||||||
|
showDefaultValue = ALWAYS
|
||||||
|
)
|
||||||
|
private var withUniversalPatches: Boolean = true
|
||||||
|
|
||||||
@Option(
|
@Option(
|
||||||
names = ["-f", "--filter-package-name"], description = ["Filter patches by package name."]
|
names = ["-f", "--filter-package-name"], description = ["Filter patches by package name."]
|
||||||
)
|
)
|
||||||
@@ -92,11 +99,12 @@ internal object ListPatchesCommand : Runnable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Patch<*>.anyPackageName(name: String) = compatiblePackages?.any { it.name == name } == true
|
fun Patch<*>.filterCompatiblePackages(name: String) = compatiblePackages?.any { it.name == name }
|
||||||
|
?: withUniversalPatches
|
||||||
|
|
||||||
val patches = PatchBundleLoader.Jar(*patchBundles)
|
val patches = PatchBundleLoader.Jar(*patchBundles)
|
||||||
|
|
||||||
val filtered = packageName?.let { patches.filter { patch -> patch.anyPackageName(it) } } ?: patches
|
val filtered = packageName?.let { patches.filter { patch -> patch.filterCompatiblePackages(it) } } ?: patches
|
||||||
|
|
||||||
if (filtered.isNotEmpty()) logger.info(filtered.joinToString("\n\n") { it.buildString() })
|
if (filtered.isNotEmpty()) logger.info(filtered.joinToString("\n\n") { it.buildString() })
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user