From a76ac04214a2ab91e3b2f9dddb13ed52816fe723 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Sun, 22 Oct 2023 18:08:00 +0200 Subject: [PATCH] fix: Do not set patch fields if they are empty --- src/main/kotlin/app/revanced/patcher/patch/Patch.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/app/revanced/patcher/patch/Patch.kt b/src/main/kotlin/app/revanced/patcher/patch/Patch.kt index c48939c..f962505 100644 --- a/src/main/kotlin/app/revanced/patcher/patch/Patch.kt +++ b/src/main/kotlin/app/revanced/patcher/patch/Patch.kt @@ -65,7 +65,8 @@ sealed class Patch> { name = annotation.name.ifEmpty { null } description = annotation.description.ifEmpty { null } compatiblePackages = annotation.compatiblePackages - .map { CompatiblePackage(it.name, it.versions.toSet()) }.toSet() + .map { CompatiblePackage(it.name, it.versions.toSet().ifEmpty { null }) } + .toSet().ifEmpty { null } dependencies = annotation.dependencies.toSet().ifEmpty { null } use = annotation.use requiresIntegrations = annotation.requiresIntegrations