build: Bump dependencies to correctly serialize patches as JSON

This commit is contained in:
oSumAtrIX 2024-08-17 00:53:13 +02:00
parent 170edd3157
commit e113daa089
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4
2 changed files with 6 additions and 6 deletions

View File

@ -10,8 +10,8 @@ ktor = "2.3.7"
ktoml = "0.5.2" ktoml = "0.5.2"
picocli = "4.7.6" picocli = "4.7.6"
datetime = "0.6.0" datetime = "0.6.0"
revanced-patcher = "19.3.1" revanced-patcher = "20.0.0"
revanced-library = "2.3.0" revanced-library = "3.0.1-dev.1"
caffeine = "3.1.8" caffeine = "3.1.8"
bouncy-castle = "1.78.1" bouncy-castle = "1.78.1"

View File

@ -4,8 +4,8 @@ import app.revanced.api.configuration.repository.BackendRepository
import app.revanced.api.configuration.repository.BackendRepository.BackendOrganization.BackendRepository.BackendRelease.Companion.first import app.revanced.api.configuration.repository.BackendRepository.BackendOrganization.BackendRepository.BackendRelease.Companion.first
import app.revanced.api.configuration.repository.ConfigurationRepository import app.revanced.api.configuration.repository.ConfigurationRepository
import app.revanced.api.configuration.schema.* import app.revanced.api.configuration.schema.*
import app.revanced.library.PatchUtils import app.revanced.library.serializeTo
import app.revanced.patcher.PatchBundleLoader import app.revanced.patcher.patch.loadPatchesFromJar
import com.github.benmanes.caffeine.cache.Caffeine import com.github.benmanes.caffeine.cache.Caffeine
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext import kotlinx.coroutines.withContext
@ -94,7 +94,7 @@ internal class PatchesService(
configurationRepository.patches.publicKeyId, configurationRepository.patches.publicKeyId,
) )
) { ) {
PatchBundleLoader.Jar(patchesFile) loadPatchesFromJar(setOf(patchesFile))
} else { } else {
// Use an empty set of patches if the signature is invalid. // Use an empty set of patches if the signature is invalid.
emptySet() emptySet()
@ -103,7 +103,7 @@ internal class PatchesService(
patchesFile.delete() patchesFile.delete()
ByteArrayOutputStream().use { stream -> ByteArrayOutputStream().use { stream ->
PatchUtils.Json.serialize(patches, outputStream = stream) patches.serializeTo(outputStream = stream)
stream.toByteArray() stream.toByteArray()
} }