diff --git a/build.gradle.kts b/build.gradle.kts index 09ccdd67..00bbd6c8 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -10,13 +10,7 @@ val githubPassword: String = project.findProperty("gpr.key") as? String ?: Syste repositories { mavenCentral() - maven { - url = uri("https://maven.pkg.github.com/revanced/multidexlib2") - credentials { - username = githubUsername - password = githubPassword - } - } + mavenLocal() maven { url = uri("https://maven.pkg.github.com/revanced/revanced-patcher") credentials { @@ -32,7 +26,7 @@ dependencies { implementation(kotlin("stdlib")) implementation(kotlin("reflect")) - implementation("app.revanced:revanced-patcher:1.11.0") + implementation("app.revanced:revanced-patcher:2.0.0") implementation("info.picocli:picocli:4.6.3") implementation("com.android.tools.build:apksig:7.2.1") implementation("com.github.revanced:jadb:master-SNAPSHOT") // updated fork diff --git a/src/main/kotlin/app/revanced/utils/patcher/Patcher.kt b/src/main/kotlin/app/revanced/utils/patcher/Patcher.kt index d4b46647..5f06595b 100644 --- a/src/main/kotlin/app/revanced/utils/patcher/Patcher.kt +++ b/src/main/kotlin/app/revanced/utils/patcher/Patcher.kt @@ -4,11 +4,11 @@ import app.revanced.cli.command.MainCommand import app.revanced.cli.command.MainCommand.args import app.revanced.cli.command.MainCommand.logger import app.revanced.patcher.Patcher -import app.revanced.patcher.data.base.Data +import app.revanced.patcher.data.Data import app.revanced.patcher.extensions.PatchExtensions.compatiblePackages import app.revanced.patcher.extensions.PatchExtensions.include import app.revanced.patcher.extensions.PatchExtensions.patchName -import app.revanced.patcher.patch.base.Patch +import app.revanced.patcher.patch.Patch import app.revanced.patcher.util.patch.implementation.JarPatchBundle fun Patcher.addPatchesFiltered( diff --git a/src/main/kotlin/app/revanced/utils/signature/Signature.kt b/src/main/kotlin/app/revanced/utils/signature/Signature.kt deleted file mode 100644 index 1e3390fa..00000000 --- a/src/main/kotlin/app/revanced/utils/signature/Signature.kt +++ /dev/null @@ -1,54 +0,0 @@ -package app.revanced.utils.signature - -import app.revanced.patcher.Patcher - -object Signature { - - fun checkSignatures(patcher: Patcher) { - TODO() - /** - val failed = mutableListOf() - for (signature in patcher.resolveSignatures()) { - val signatureClass = signature::class.java - val signatureName = signature.name ?: signatureClass.simpleName - if (!signature.resolved) { - failed.add(signatureName) - continue - } - - val method = signature.result!!.method - val matchingMethod = signature.matchingMethod ?: MatchingMethod() - - println( - """ - [Signature] $signatureName - [Method] ${matchingMethod.definingClass}->${matchingMethod.name} - [Match] ${method.definingClass}->${method.toStr()} - """.trimIndent() - ) - - signature.fuzzyThreshold.let { - val warnings = signature.result!!.scanResult.warnings!! - println( - """ - [Warnings: ${warnings.count()}] - ${warnings.joinToString(separator = "\n") { warning -> "${warning.instructionIndex} / ${warning.patternIndex}: ${warning.wrongOpcode} (expected: ${warning.correctOpcode})" }} - """.trimIndent() - ) - } - } - - println( - """ - ${"=".repeat(50)} - [Failed signatures: ${failed.size}] - ${failed.joinToString(separator = "\n") { it }} - """.trimIndent() - ) - */ - } - - //private fun Method.toStr(): String { - // return "${this.name}(${this.parameterTypes.joinToString("")})${this.returnType}" - //} -} \ No newline at end of file