From 739945013962fd80d2635fff126d84046870f956 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Mon, 18 Apr 2022 18:41:46 +0200 Subject: [PATCH] fix: `PackageMetadata` Signed-off-by: oSumAtrIX --- .../kotlin/app/revanced/patcher/patch/Patch.kt | 14 ++++++++++++-- .../revanced/patcher/signature/MethodSignature.kt | 11 +---------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/main/kotlin/app/revanced/patcher/patch/Patch.kt b/src/main/kotlin/app/revanced/patcher/patch/Patch.kt index dab2ba6..c87bbc3 100644 --- a/src/main/kotlin/app/revanced/patcher/patch/Patch.kt +++ b/src/main/kotlin/app/revanced/patcher/patch/Patch.kt @@ -31,6 +31,16 @@ data class PatchMetadata( val shortName: String, val name: String, val description: String, - val compatiblePackages: Iterable, + val compatiblePackages: Iterable, val version: String, -) \ No newline at end of file +) + +/** + * Metadata about a package. + * @param name The package name. + * @param versions Compatible versions of the package. + */ +data class PackageMetadata( + val name: String, + val versions: Iterable +) diff --git a/src/main/kotlin/app/revanced/patcher/signature/MethodSignature.kt b/src/main/kotlin/app/revanced/patcher/signature/MethodSignature.kt index 3eb72ba..8db9a24 100644 --- a/src/main/kotlin/app/revanced/patcher/signature/MethodSignature.kt +++ b/src/main/kotlin/app/revanced/patcher/signature/MethodSignature.kt @@ -1,6 +1,7 @@ package app.revanced.patcher.signature import app.revanced.patcher.MethodNotFoundException +import app.revanced.patcher.patch.PackageMetadata import org.jf.dexlib2.Opcode /** @@ -57,16 +58,6 @@ data class MethodSignatureMetadata( val version: String ) -/** - * Metadata about a package. - * @param name The package name. - * @param version The version of the package. - */ -data class PackageMetadata( - val name: String, - val version: String -) - /** * Metadata about the method for a [MethodSignature]. * @param definingClass The defining class name of the method.