1
mirror of https://github.com/revanced/revanced-cli synced 2025-11-19 15:33:27 +01:00

Compare commits

...

16 Commits

Author SHA1 Message Date
semantic-release-bot
fd8b00702d chore(release): 4.0.1-dev.1 [skip ci]
## [4.0.1-dev.1](https://github.com/ReVanced/revanced-cli/compare/v4.0.0...v4.0.1-dev.1) (2023-10-07)

### Bug Fixes

* Correct warning message ([e4e339d](e4e339dff4))
2023-10-07 00:10:10 +00:00
oSumAtrIX
e4e339dff4 fix: Correct warning message 2023-10-07 01:56:13 +02:00
oSumAtrIX
0c70b589b6 build(Needs bump): Bump dependencies 2023-10-07 01:56:12 +02:00
oSumAtrIX
ca07dbc0e7 docs: Fix incorrect bullet point 2023-10-07 01:14:12 +02:00
oSumAtrIX
7ff433860d chore: Add missing assets 2023-10-05 01:52:20 +02:00
semantic-release-bot
7121e5fa4c chore(release): 4.0.0 [skip ci]
# [4.0.0](https://github.com/ReVanced/revanced-cli/compare/v3.1.1...v4.0.0) (2023-10-04)

### Bug Fixes

* Check, if mounting is possible ([3e13fb5](3e13fb5d56))
* Delete temporal files if it exists ([a022feb](a022febd0c))
* Do not sign if mounting ([578e16b](578e16b099))
* Filter logs correctly ([43fc20d](43fc20d90e))
* Log correct options command ([#262](https://github.com/ReVanced/revanced-cli/issues/262)) ([96c196d](96c196dcb1))
* Log logs with levels over warning to error output stream ([075f6ad](075f6ad565))
* Only open files for reading and writing if writeable ([3846f72](3846f721ca))
* Only set options for filtered patches ([64d9127](64d9127291))

### Features

* Add function to get the most common compatible version ([77d9173](77d91735ff))
* Add option to filter patches to be listed by package name ([50c0f98](50c0f98ce5))
* Add option to warn about patches not being found in supplied patch bundles ([e46d855](e46d855643))
* Add ReVanced Library subproject ([#265](https://github.com/ReVanced/revanced-cli/issues/265)) ([157278c](157278c9ba))
* Do not format patch names ([80a8d88](80a8d88406))
* Extend signing API ([592dc1c](592dc1c64a))
* Improve option descriptions ([d5ea5a0](d5ea5a0ab1))
* Log stacktrace in new line ([c67e3c7](c67e3c70c7))
* Use ReVanced Library in ReVanced CLI ([7794327](7794327a11))
* Word log message better ([6942b22](6942b22a68))

### Performance Improvements

* Do not check, if the options file exists twice ([e3c5550](e3c55507cf))

### BREAKING CHANGES

* This changes many signatures of existing APIs and adds new functions for signing
* This changes the log handler signature
2023-10-04 23:40:45 +00:00
oSumAtrIX
23b5e8b7f9 chore: Merge branch dev to main (#263) 2023-10-05 01:38:56 +02:00
semantic-release-bot
d1c4d8df3e chore(release): 4.0.0-dev.5 [skip ci]
# [4.0.0-dev.5](https://github.com/ReVanced/revanced-cli/compare/v4.0.0-dev.4...v4.0.0-dev.5) (2023-10-04)

### Bug Fixes

* Only set options for filtered patches ([64d9127](64d9127291))

### Performance Improvements

* Do not check, if the options file exists twice ([e3c5550](e3c55507cf))
2023-10-04 02:28:12 +00:00
oSumAtrIX
89acffe788 build: Bump dependencies 2023-10-04 04:22:55 +02:00
oSumAtrIX
64d9127291 fix: Only set options for filtered patches
This prevents errors when settings required options from patches that are not accepted to `null`.
2023-10-04 04:18:31 +02:00
oSumAtrIX
e3c55507cf perf: Do not check, if the options file exists twice 2023-10-04 04:08:27 +02:00
semantic-release-bot
64afc95a81 chore(release): 4.0.0-dev.4 [skip ci]
# [4.0.0-dev.4](https://github.com/ReVanced/revanced-cli/compare/v4.0.0-dev.3...v4.0.0-dev.4) (2023-10-01)
2023-10-01 22:44:02 +00:00
oSumAtrIX
022fd230f6 build(Needs bump): Bump dependencies 2023-10-01 23:51:36 +02:00
semantic-release-bot
a177693ece chore(release): 4.0.0-dev.3 [skip ci]
# [4.0.0-dev.3](https://github.com/ReVanced/revanced-cli/compare/v4.0.0-dev.2...v4.0.0-dev.3) (2023-09-27)
2023-09-27 23:29:39 +00:00
oSumAtrIX
4b6dbffd7b build(Needs bump): Bump dependencies 2023-09-27 23:25:44 +02:00
oSumAtrIX
78e89dd3bf ci: Bump checkout action 2023-09-27 18:02:51 +02:00
11 changed files with 84 additions and 18 deletions

View File

@@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Open pull request
uses: repo-sync/pull-request@v2
with:

View File

@@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
# Make sure the release step uses its own credentials:
# https://github.com/cycjimmy/semantic-release-action#private-packages

View File

@@ -1,3 +1,65 @@
## [4.0.1-dev.1](https://github.com/ReVanced/revanced-cli/compare/v4.0.0...v4.0.1-dev.1) (2023-10-07)
### Bug Fixes
* Correct warning message ([e4e339d](https://github.com/ReVanced/revanced-cli/commit/e4e339dff40542d6265de59496545c859312cf11))
# [4.0.0](https://github.com/ReVanced/revanced-cli/compare/v3.1.1...v4.0.0) (2023-10-04)
### Bug Fixes
* Check, if mounting is possible ([3e13fb5](https://github.com/ReVanced/revanced-cli/commit/3e13fb5d56eb2a90c2a4a1ddfc05852b1f70add5))
* Delete temporal files if it exists ([a022feb](https://github.com/ReVanced/revanced-cli/commit/a022febd0c70807ddc3fa9948207a2a70d5191da))
* Do not sign if mounting ([578e16b](https://github.com/ReVanced/revanced-cli/commit/578e16b099fddfd2bb56accb225d04dfcd409b0c))
* Filter logs correctly ([43fc20d](https://github.com/ReVanced/revanced-cli/commit/43fc20d90e0a694b231b17bb7d9ecfa22bb5d9a0))
* Log correct options command ([#262](https://github.com/ReVanced/revanced-cli/issues/262)) ([96c196d](https://github.com/ReVanced/revanced-cli/commit/96c196dcb14e37ad91b751af61ee8382547c1ca3))
* Log logs with levels over warning to error output stream ([075f6ad](https://github.com/ReVanced/revanced-cli/commit/075f6ad56528a667dca1f0bed704cf7e5381026f))
* Only open files for reading and writing if writeable ([3846f72](https://github.com/ReVanced/revanced-cli/commit/3846f721ca015ab39a7e4b8d3f3d61163a6f1650))
* Only set options for filtered patches ([64d9127](https://github.com/ReVanced/revanced-cli/commit/64d9127291ea9a8abe21a0e82721721495094472))
### Features
* Add function to get the most common compatible version ([77d9173](https://github.com/ReVanced/revanced-cli/commit/77d91735ffbbd6e733f08176f535bfd39ece0c29))
* Add option to filter patches to be listed by package name ([50c0f98](https://github.com/ReVanced/revanced-cli/commit/50c0f98ce5927e07839437a2e550aa85f5a7e62d))
* Add option to warn about patches not being found in supplied patch bundles ([e46d855](https://github.com/ReVanced/revanced-cli/commit/e46d85564320f46c6faa54b2d3fa7fca3fa60019))
* Add ReVanced Library subproject ([#265](https://github.com/ReVanced/revanced-cli/issues/265)) ([157278c](https://github.com/ReVanced/revanced-cli/commit/157278c9ba25f0f786c5fe58e3e23f6890107118))
* Do not format patch names ([80a8d88](https://github.com/ReVanced/revanced-cli/commit/80a8d88406b2b04d13dca4fb0d7d7d62e1910317))
* Extend signing API ([592dc1c](https://github.com/ReVanced/revanced-cli/commit/592dc1c64ae4078e73bb71eba11380b301c79dea))
* Improve option descriptions ([d5ea5a0](https://github.com/ReVanced/revanced-cli/commit/d5ea5a0ab1cc015730063e5be94ee18bd88cc906))
* Log stacktrace in new line ([c67e3c7](https://github.com/ReVanced/revanced-cli/commit/c67e3c70c7eaa514cde1bebe775a2216bc4a6074))
* Use ReVanced Library in ReVanced CLI ([7794327](https://github.com/ReVanced/revanced-cli/commit/7794327a11e8a0e0f28176cd45fad797b924c45f))
* Word log message better ([6942b22](https://github.com/ReVanced/revanced-cli/commit/6942b22a68de5e991987ea89882915917aec93a3))
### Performance Improvements
* Do not check, if the options file exists twice ([e3c5550](https://github.com/ReVanced/revanced-cli/commit/e3c55507cf52e697b9ce9d59decc1cbe4cfe5b43))
### BREAKING CHANGES
* This changes many signatures of existing APIs and adds new functions for signing
* This changes the log handler signature
# [4.0.0-dev.5](https://github.com/ReVanced/revanced-cli/compare/v4.0.0-dev.4...v4.0.0-dev.5) (2023-10-04)
### Bug Fixes
* Only set options for filtered patches ([64d9127](https://github.com/ReVanced/revanced-cli/commit/64d9127291ea9a8abe21a0e82721721495094472))
### Performance Improvements
* Do not check, if the options file exists twice ([e3c5550](https://github.com/ReVanced/revanced-cli/commit/e3c55507cf52e697b9ce9d59decc1cbe4cfe5b43))
# [4.0.0-dev.4](https://github.com/ReVanced/revanced-cli/compare/v4.0.0-dev.3...v4.0.0-dev.4) (2023-10-01)
# [4.0.0-dev.3](https://github.com/ReVanced/revanced-cli/compare/v4.0.0-dev.2...v4.0.0-dev.3) (2023-09-27)
# [4.0.0-dev.2](https://github.com/ReVanced/revanced-cli/compare/v4.0.0-dev.1...v4.0.0-dev.2) (2023-09-24)

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 11 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 11 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@@ -46,7 +46,7 @@ Learn how to ReVanced CLI.
This will generate an `options.json` file for the patches from a list of supplied patch bundles.
The file can be supplied to ReVanced CLI later on.
- ```bash
```bash
java -jar revanced-cli.jar options \
--path options.json \
--overwrite \

View File

@@ -1,4 +1,4 @@
org.gradle.parallel = true
org.gradle.caching = true
kotlin.code.style = official
version = 4.0.0-dev.2
version = 4.0.1-dev.1

View File

@@ -3,8 +3,8 @@ shadow = "8.1.1"
kotlin-test = "1.8.20-RC"
kotlinx-coroutines-core = "1.7.3"
picocli = "4.7.3"
revanced-patcher = "15.0.1"
revanced-library = "1.0.1"
revanced-patcher = "16.0.2"
revanced-library = "1.1.2"
[libraries]
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin-test" }

View File

@@ -39,8 +39,9 @@ internal object OptionsCommand : Runnable {
override fun run() = try {
PatchBundleLoader.Jar(*patchBundles).let { patches ->
if (!filePath.exists() || overwrite) {
if (update && filePath.exists()) patches.setOptions(filePath)
val exists = filePath.exists()
if (!exists || overwrite) {
if (exists && update) patches.setOptions(filePath)
Options.serialize(patches, prettyPrint = true).let(filePath::writeText)
} else throw OptionsFileAlreadyExistsException()

View File

@@ -196,13 +196,6 @@ internal object PatchCommand : Runnable {
logger.warning("Unknown input of patches:\n${unknownPatches.joinToString("\n")}")
}
logger.info("Setting patch options")
optionsFile.let {
if (it.exists()) patches.setOptions(it)
else Options.serialize(patches, prettyPrint = true).let(it::writeText)
}
// endregion
Patcher(
@@ -213,11 +206,18 @@ internal object PatchCommand : Runnable {
resourceCachePath.absolutePath,
)
).use { patcher ->
val filteredPatches = patcher.filterPatchSelection(patches).also { patches ->
logger.info("Setting patch options")
if (optionsFile.exists()) patches.setOptions(optionsFile)
else Options.serialize(patches, prettyPrint = true).let(optionsFile::writeText)
}
// region Patch
val patcherResult = patcher.apply {
acceptIntegrations(integrations)
acceptPatches(filterPatchSelection(patches))
acceptPatches(filteredPatches.toList())
// Execute patches.
runBlocking {
@@ -277,7 +277,7 @@ internal object PatchCommand : Runnable {
* @param patches The patches to filter.
* @return The filtered patches.
*/
private fun Patcher.filterPatchSelection(patches: PatchSet) = buildList {
private fun Patcher.filterPatchSelection(patches: PatchSet): PatchSet = buildSet {
val packageName = context.packageMetadata.packageName
val packageVersion = context.packageMetadata.packageVersion
@@ -298,7 +298,7 @@ internal object PatchCommand : Runnable {
"$patchName is incompatible with version $packageVersion. "
+ "This patch is only compatible with version "
+ packages.joinToString(";") { pkg ->
"${pkg.name}: ${pkg.versions!!.joinToString(", ")}"
pkg.versions!!.joinToString(", ")
}
)
} ?: return@patch logger.fine(