Skip to content

Commit

Permalink
build: Bump dependencies to correctly serialize patches as JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
oSumAtrIX committed Aug 16, 2024
1 parent 170edd3 commit e113daa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ ktor = "2.3.7"
ktoml = "0.5.2"
picocli = "4.7.6"
datetime = "0.6.0"
revanced-patcher = "19.3.1"
revanced-library = "2.3.0"
revanced-patcher = "20.0.0"
revanced-library = "3.0.1-dev.1"
caffeine = "3.1.8"
bouncy-castle = "1.78.1"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.ConfigurationRepository
import app.revanced.api.configuration.schema.*
import app.revanced.library.PatchUtils
import app.revanced.patcher.PatchBundleLoader
import app.revanced.library.serializeTo
import app.revanced.patcher.patch.loadPatchesFromJar
import com.github.benmanes.caffeine.cache.Caffeine
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
Expand Down Expand Up @@ -94,7 +94,7 @@ internal class PatchesService(
configurationRepository.patches.publicKeyId,
)
) {
PatchBundleLoader.Jar(patchesFile)
loadPatchesFromJar(setOf(patchesFile))
} else {
// Use an empty set of patches if the signature is invalid.
emptySet()
Expand All @@ -103,7 +103,7 @@ internal class PatchesService(
patchesFile.delete()

ByteArrayOutputStream().use { stream ->
PatchUtils.Json.serialize(patches, outputStream = stream)
patches.serializeTo(outputStream = stream)

stream.toByteArray()
}
Expand Down

0 comments on commit e113daa

Please sign in to comment.