Compare commits

...

6 Commits

Author SHA1 Message Date
semantic-release-bot
9476f5a2e4 chore(release): 4.5.0-dev.1 [skip ci]
# [4.5.0-dev.1](https://github.com/ReVanced/revanced-cli/compare/v4.4.2...v4.5.0-dev.1) (2024-03-11)

### Bug Fixes

* Show path for missing files instead of just the name ([f0f3e56](f0f3e5614b))
* Sign APKs correctly ([5ff105c](5ff105cf6b))

### Features

* Remove deprecated CLI options ([48a1a39](48a1a39b94))
2024-03-11 09:08:04 +00:00
oSumAtrIX
5ff105cf6b fix: Sign APKs correctly 2024-03-11 10:05:32 +01:00
oSumAtrIX
f0f3e5614b fix: Show path for missing files instead of just the name 2024-03-11 10:05:04 +01:00
oSumAtrIX
48a1a39b94 feat: Remove deprecated CLI options 2024-03-11 09:22:35 +01:00
semantic-release-bot
c45ed69adf chore(release): 4.4.2 [skip ci]
## [4.4.2](https://github.com/ReVanced/revanced-cli/compare/v4.4.1...v4.4.2) (2024-03-10)
2024-03-10 15:44:08 +00:00
oSumAtrIX
8641d301b1 chore: Merge branch dev to main (#315) 2024-03-10 16:42:17 +01:00
3 changed files with 37 additions and 31 deletions

View File

@@ -1,3 +1,18 @@
# [4.5.0-dev.1](https://github.com/ReVanced/revanced-cli/compare/v4.4.2...v4.5.0-dev.1) (2024-03-11)
### Bug Fixes
* Show path for missing files instead of just the name ([f0f3e56](https://github.com/ReVanced/revanced-cli/commit/f0f3e5614b99b34391e0492177706f9c09781cad))
* Sign APKs correctly ([5ff105c](https://github.com/ReVanced/revanced-cli/commit/5ff105cf6b3fac9cd12478efd10caf90d1ecf589))
### Features
* Remove deprecated CLI options ([48a1a39](https://github.com/ReVanced/revanced-cli/commit/48a1a39b94dd9121c400d28e3e93dec3fc13e3be))
## [4.4.2](https://github.com/ReVanced/revanced-cli/compare/v4.4.1...v4.4.2) (2024-03-10)
## [4.4.2-dev.2](https://github.com/ReVanced/revanced-cli/compare/v4.4.2-dev.1...v4.4.2-dev.2) (2024-03-10) ## [4.4.2-dev.2](https://github.com/ReVanced/revanced-cli/compare/v4.4.2-dev.1...v4.4.2-dev.2) (2024-03-10)
## [4.4.2-dev.1](https://github.com/ReVanced/revanced-cli/compare/v4.4.1...v4.4.2-dev.1) (2024-03-09) ## [4.4.2-dev.1](https://github.com/ReVanced/revanced-cli/compare/v4.4.1...v4.4.2-dev.1) (2024-03-09)

View File

@@ -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.4.2-dev.2 version = 4.5.0-dev.1

View File

@@ -142,17 +142,6 @@ internal object PatchCommand : Runnable {
) )
private var signer = "ReVanced" private var signer = "ReVanced"
@CommandLine.Option(
names = ["-r", "--resource-cache"],
description = ["Path to temporary resource cache directory."],
)
private var resourceCachePath: File? = null
set(value) {
logger.warning("The --resource-cache option is deprecated. Use --temporary-files-patch instead.")
field = value
temporaryFilesPath = value
}
@CommandLine.Option( @CommandLine.Option(
names = ["-t", "--temporary-files-path"], names = ["-t", "--temporary-files-path"],
description = ["Path to temporary files directory."], description = ["Path to temporary files directory."],
@@ -184,7 +173,7 @@ internal object PatchCommand : Runnable {
if (!apk.exists()) { if (!apk.exists()) {
throw CommandLine.ParameterException( throw CommandLine.ParameterException(
spec.commandLine(), spec.commandLine(),
"APK file ${apk.name} does not exist", "APK file ${apk.path} does not exist",
) )
} }
this.apk = apk this.apk = apk
@@ -197,7 +186,7 @@ internal object PatchCommand : Runnable {
@Suppress("unused") @Suppress("unused")
private fun setIntegrations(integrations: Array<File>) { private fun setIntegrations(integrations: Array<File>) {
integrations.firstOrNull { !it.exists() }?.let { integrations.firstOrNull { !it.exists() }?.let {
throw CommandLine.ParameterException(spec.commandLine(), "Integrations file ${it.name} does not exist.") throw CommandLine.ParameterException(spec.commandLine(), "Integrations file ${it.path} does not exist.")
} }
this.integrations += integrations this.integrations += integrations
} }
@@ -273,12 +262,13 @@ internal object PatchCommand : Runnable {
} }
// endregion // endregion
val patcherTemporaryFilesPath = temporaryFilesPath.resolve("patcher")
val (packageName, patcherResult) = Patcher( val (packageName, patcherResult) = Patcher(
PatcherConfig( PatcherConfig(
apk, apk,
temporaryFilesPath, patcherTemporaryFilesPath,
aaptBinaryPath?.path, aaptBinaryPath?.path,
temporaryFilesPath.absolutePath, patcherTemporaryFilesPath.absolutePath,
true, true,
), ),
).use { patcher -> ).use { patcher ->
@@ -315,21 +305,22 @@ internal object PatchCommand : Runnable {
} }
// region Save // region Save
apk.copyTo(temporaryFilesPath.resolve(apk.name), overwrite = true).apply {
apk.copyTo(outputFilePath, overwrite = true) patcherResult.applyTo(this)
}.let {
patcherResult.applyTo(outputFilePath) if (!mount) {
sign(
if (!mount) { it,
outputFilePath.sign( outputFilePath,
ApkUtils.SigningOptions( ApkUtils.SigningOptions(
keystoreFilePath, keystoreFilePath,
keyStorePassword, keyStorePassword,
alias, alias,
password, password,
signer, signer,
), ),
) )
}
} }
logger.info("Saved to $outputFilePath") logger.info("Saved to $outputFilePath")